\*
Test code for new language, based on C++, PHP, and mIRC script
By Chase Slabaugh
*\
inc lib::http \\ Include HTTP access library
inc lib::io \\ Include basic IO library
inc lib::var \\ Include variable (string, int, array, etc.) library
main { \\ Start main function
out:"Hello world!\nEnter an address: "; \\ Tells the user to enter an address
string:website == in[]; \\ Sets the string called 'website' to whatever the user enters, in[].
\\ in's params can include chararcters to strip from the data, in the
\\ form of ASCII numbers, ex. in[32] for what the user entered without spaces.
while (http:get[website]) { \\ While there is data to be read from the website, loop
string read == http:get[website]; \\ Sets the string read to whatever the current line of data is from the website
if (regex[*foobar*,read]) { \\ if there is a regex match in the current line for *foobar*,
array:foo =+ read; \\ add it to the array called foo (additions to any variable are =+)
}
}
out:"\nLines containing foobar in page".website.":\n"; \\ tell the user what it will output
out:foo["\n"] \\ output the contents of the array, separated by the argument, in this case a newline (\n)
}