Now version 1.5 provides MULTILINE SYNTAX and some minor enhancements.
To activate the parsing mode, please set the -p or --param parameter. Parsing takes much time, so only activate it, if neccessary.
There are 3 parsing modes:
- Multiline with (CR)LF replacement. Each (CR)LF in the code will be replaced with +#CRLF$+. You can either enforce CRLFs, LFs or let the interpreter choose automatically. Depending on the OS (Linux or Windows) it will select CRLF or LF.
Possible starting token: <<multi, <<multiline, <<here, <<crlf (enforces newlines to be CRLFs), <<lf (enforces LFs only - Multiline without newline replacement: Simply sticks multiple lines together. Hint: Append a trailing space, if you want to normal text over multiple lines.
Possible starting token: << - Insert an external file at the current position and handle it like mode 1, i. e. with CRLF-replacement.
Possible staring token: <<include, <<file
Multiline code is started end ended with the token << (like the PB bit shift operator). It is inserted at where the starting token is located. Note that the first newline (directly after <<) and the last newline (directly before <<) do not count! If you need prepending/trailing newlines, you must hardcode them yourself.
Example mode 1:
Code: Select all
OpenConsole()
Print("<<multiline
<html>
<head>
<title>My Website</title>
</head>
<body>
This is HTML code
</body>
</html>
<<")
Result wrote:OpenConsole()
Print("<html>"+#LF$+"<head>"+#LF$+" <title>My Website</title>"+#LF$+"</head>"+#LF$+"<body>"+#LF$+" This is HTML code"+#LF$+"</body>"+#LF$+"</html>")
Example mode 2:
Code: Select all
name$="Homer"
OpenConsole()
Print("<<
To do:
feed pets,
housework,
meet "+name$+".
<<") : Debug "This should be on the same line"
Note that you can interrupt multi line code and you can insert any variables or expressions - just like you can do with single line code. This also applies to mode 1.Result wrote:name$="Homer"
OpenConsole()
Print("To do: feed pets, housework, meet "+name$".") : Debug "This should be on the same line"
Example mode 3:
File hello.txt
Code: Select all
Hello from an external file! My address is:
Code: Select all
Homer Simpson
Evergreen Terrace 13
Springfield
Code: Select all
OpenConsole()
Print("<<file
/hello.txt
/gaga.tmp
/address.dat
<<")
Result wrote:OpenConsole()
Print("Hello from an external file! My address is:
Homer Simpson
Evergreen Terrace 13
Springfield