- Processing創意編程指南
- 杜煒
- 242字
- 2022-07-29 14:40:22
1.3 注釋
注釋是用來解釋每一段代碼意義的。而當一段有效的代碼被注釋后,這一段代碼將失去原有的功能,變成一段普通的解釋性文字。Processing中的注釋有三種方法://“被注釋的內容”“/*被注釋的內容*/”和“/**被注釋的內容*/”。前兩種注釋方法都是經常使用的,“//”是對單行進行注釋(圖1.3.1),“/*……*/”是進行多行注釋(圖1.3.2),/**……*/是文檔注釋,輸出程序會把注釋內容變成Javadoc文檔,寫入名為“index.html”的本地網頁文件中。

圖1.3.1 單行注釋

圖1.3.2 多行注釋
單行注釋代碼如下:
//print("hello world from java \n"); print("hello world from Processing");
多行注釋代碼如下:
/*print("hello world from java \n"); print("hello world from Processing"); */
推薦閱讀
- Oracle從入門到精通(第3版)
- R語言數據分析從入門到精通
- R語言游戲數據分析與挖掘
- Python高級機器學習
- 鋒利的SQL(第2版)
- Building Minecraft Server Modifications
- Scala程序員面試算法寶典
- Windows Phone 7.5:Building Location-aware Applications
- Instant Lucene.NET
- C/C++程序員面試指南
- INSTANT Silverlight 5 Animation
- Clojure for Java Developers
- Java Hibernate Cookbook
- Java程序設計實用教程(第2版)
- Node.js 6.x Blueprints