OE update using_euphoria 5
Documentation Version for Comments and Changes
You are invited to make any changes...add any comments.
Changes will `eventually` be merged into the offical documentation.
Leave any commnents here...
...
... back to index page OE documentation
to customize its behavior. These arguments are read within your program by the built-in function command_line.
Optionally, you may also use command line switches that are typed between the interpreter name and the program name. Command line switches customize how the interpreter itself behaves.
Unlike many other compilers and interpreters, there is no obligation for any special command-line options for eui or euiw. Only the name of you Euphoria file is expected, and if you do not supply it, Euphoria will display all the command line options available.
Euphoria doesn't care about your choice of file extensions. By convention, however, console-based applications have an extension of .ex, GUI-based applications have an extension of .exw and include files have an extension of .e. Note that a GUI application is not necessarily a Windows program. A GUI application can exist on Linux, OS X, FreeBSD, and so on.
You can redirect standard input and standard output when you run a Euphoria program, for example:
eui filesort.ex < raw.txt > sorted.txt
or simply,
eui filesort < raw.txt > sorted.txt
For frequently-used programs under Windows you might want to make a small .bat (batch) file, perhaps called myprog.bat, containing two statements like:
@echo off eui myprog.ex %1 %2 %3 %4 %5 %6 %7 %8 %9
The first statement turns off echoing of commands to the screen. The second runs eui myprog.ex with up to 9 command-line arguments. See command_line for an example of how to read these arguments. Having a .bat file will save you the minor inconvenience of typing eui all the time; for example you can just type:
myprog
instead of:
eui myprog
Under modern Unix variants, you can use #!/usr/bin/env eui as the first line of your script file. On older Unix variants, you may need to use the full path to eui, #!/usr/local/bin/eui.
If your program is called foo.ex:
#!/usr/bin/env eui procedure foo() ? 2+2 end procedure foo()
Then if you make your file executable:
chmod +x foo.ex
You can just type:
Not Categorized, Please Help
|