Google

Go to the first, previous, next, last section, table of contents.


load

load("filename")
:: Reads a program file filename.
return
(1|0)
filename
file (path) name
  • See section User language Asir for practical programming. Since text files are read through cpp, the user can use, as in C programs, #include and #define in Asir program source codes.
  • It returns 1 if the designated file exists, 0 otherwise.
  • If the filename begins with `/', it is understood as an absolute path name; with `.', relative path name from current directory; otherwise, the file is searched first from directories assigned to an environmental variable ASIRLOADPATH, then if the search ends up in failure, the standard library directory (or directories assigned to ASIR_LIBDIR) shall be searched. On Windows, get_rootdir()/lib is searched if ASIR_LIBDIR is not set.
  • We recommend to write an end command at the last line of your program. If not, Asir will not give you a prompt after it will have executed load command. (Escape with an interrupt character (section Interruption), if you have lost yourself.) Even in such a situation, Asir itself is still ready to read keyboard inputs as usual. It is, however, embarrassing and may cause other errors. Therefore, to put an end$ at the last line is desirable. (Command end; will work as well, but it also returns and displays verbose.)
  • On Windows one has to use `/' as the separator of directory names.
References
section end, quit, section which, section get_rootdir.


Go to the first, previous, next, last section, table of contents.