next up previous
Next: Geometry and graphics Up: Level types Previous: Expression editor

Programs

Programs may be written in a commandline if they are one or two lines long, but for more complex programs, it is a good idea to put them in a separate program level, using the Prg->New program menu. This will open an editor in a new level. Type your program (the Prg menu may help you for the syntax of tests, loops, function definition, etc.), and press the OK button once completed. If parse is successfull, you can test your program in any commandline.

The Prg menu has items to open or import an existing (program) file inside the current text, save or export the current program (independently from the worksheet). You can also use the menu to insert programming structures. There are buttons to find the next occurence of a search string, to parse the current program (errors are displayed in the messages area) and to save the program (the current filename is displayed at the right of the save button).

The keywords of the language are highlighted. In Xcas programming mode, the tabulation key may be used for indentation (experimental feature).

Tip: before pressing the OK button, check the programming syntax by looking at the status area button in the middle at the top of the session. If you need to change the syntax, hit the status button and select the right syntax.


next up previous
Next: Geometry and graphics Up: Level types Previous: Expression editor
giac documentation written by Bernard Parisse