mirror of
https://github.com/processing/processing4.git
synced 2026-01-28 02:41:08 +01:00
Offers support for multi-line strings with a flag to simulate the feature prior to switching to Java 17 build flags. Note that comments are left in (TODOs) where the switch would be required to support it "natively".
36 lines
876 B
Plaintext
36 lines
876 B
Plaintext
import processing.core.*;
|
|
import processing.data.*;
|
|
import processing.event.*;
|
|
import processing.opengl.*;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.ArrayList;
|
|
import java.io.File;
|
|
import java.io.BufferedReader;
|
|
import java.io.PrintWriter;
|
|
import java.io.InputStream;
|
|
import java.io.OutputStream;
|
|
import java.io.IOException;
|
|
|
|
public class multilinestr extends PApplet {
|
|
|
|
public void setup() {
|
|
String testOldStyle = "line1\"\nline 2 \"\"\nline 3";
|
|
String testMultiline = "\nline4 \"\nline 5 \"\"\nline 6\nline 7";
|
|
|
|
println(testOldStyle);
|
|
println(testMultiline);
|
|
|
|
noLoop();
|
|
}
|
|
|
|
static public void main(String[] passedArgs) {
|
|
String[] appletArgs = new String[] { "multilinestr" };
|
|
if (passedArgs != null) {
|
|
PApplet.main(concat(appletArgs, passedArgs));
|
|
} else {
|
|
PApplet.main(appletArgs);
|
|
}
|
|
}
|
|
}
|