Primitives |
Arguments |
Use |
files |
none |
By default, lists the contents of the directory. (Equivalent to the ls command for Linux users and the dir command for DOS users) |
loadimage, li |
a: list |
Load the image file contained in the list. Its upper left corner will be placed at the turtle's location. The only supported formats are .png and .jpg. The path specified must be relative to the current folder. Eg: setdir "C:\\my_images_dir loadimage "turtle.jpg |
setdir, setdirectory |
l: list |
Specifies the current directory. The path must be absolute. The directory must be specified with a word. |
changedirectory, cd |
m: word |
Allows to choose the current directory. The path is related to the current directory. You can use the '..' notation to refer to the parent directory. |
dir, directory |
aucun |
Gives the current directory. The default is the user's home directory, ie /home/your_login for Linux users, C:
WINDOWS for Windows users. |
save |
w: word l:list |
A good example to explain this:
save "test.lgo [proc1 proc2 proc3] saves in the file test.lgo in the current directory the procedues proc1, proc2 et proc3. If the extension .lgo is omitted, it is added by default. The specified word gives a relative path starting from the current directory. This command will not work with an absolute path. |
saved |
w: word |
saved "test.lgo saves in the file test.lgo in the current directory the collection of procedures currently defined. If the extension .lgo is omitted, it is added by default. The specified word gives a relative path starting from the current directory. This command will not work with an absolute path. |
ed, edit |
li: list or word |
Open the editor with all the procedure specified in the list li. |
edall |
none |
Open the editor with all the currently defined procedures. |
load |
w: word |
Opens and reads the file w. For example, to delete all the defined procedures and load the file test.lgo, you would use: efns load "test.lgo. The specified word gives a relative path starting from the current directory. This command will not work with an absolute path. |
openflow |
id file |
When you want to read or write in a file, you must first open a flow toward this file. The argument file must be the name of the file you want. You must use a phrase to show the name of the file in the current directory. The id argument is the number given to this flux so as to identify it. |
listflow |
none |
Shows the list of the various open fluxes with their identifiers. |
readlineflow |
id |
Opens the flow which identifier corresponds to the number used as argument and then reads a line in this file. |
readcharflow |
id |
Opens the flux which identifier corresponds to the number used as argument and then reads a character in this file. This primitive sends back a number representing the value of the character (similar to readchar). |
writelineflow |
id list |
Writes the text line included in the list at the beginning of the file identified thanks to the identifier id. Be careful, the writing is effective only after the flow has been closed by the primitive closeflow. |
appendlineflow |
id list |
Writes the text line included in the list at the end of the file identified thanks to the identifier id. Be careful, the writing is effective only after the flux has been closed by the primitive closeflow. |
closeflow |
id |
Closes the flux when its identifier number is written as argument. |
endflow? |
id |
Sends back "true if it is the end of the file. Otherwise sends back "false. |