|
<< Click to Display Table of Contents >> EDIT |
![]() ![]()
|
The EDIT statement uses Notepad to open up the designated file. The statement is practical for editing Gekko program files (.gcm), listfiles, table or menu files, data files like .csv, .prn, etc. See also XEDIT for xml files.
For smaller programs and experiments etc., you can just use the input part of the Gekko window as a kind of text editor (it is possible to restore the input part of the window from session to session).
You may use remote control for Gekko program files, cf. option interface remote = yes|no;.
edit filename ;
filename |
Filenames may contain an absolute path like c:\projects\gekko\bank.gbk, or a relative path \gekko\bank.gbk. Filenames containing blanks and special characters should be put inside quotes. Regarding reading of files, files in libraries can be referred to with colon (for instance lib1:bank.gbk), and "zip paths" are allowed too (for instance c:\projects\data.zip\bank.gbk). See more on filenames here. The extension .gcm is automatically added, if it is missing. If the filename is set to '*', you will be asked to choose the file in Windows Explorer. |
You may use this to open up the file forecst1.gcm from the working folder:
edit forecst1; |
The .gcm extension is automatically inserted. You may select .gcm files like this:
edit *; |
This will open up a file dialog with .gcm files to choose from.
As mentioned under RUN, instead of EDIT most people use a 'real' external text editor like for instance VS Code or Sublime Text to edit Gekko program files (.gcm). For VS Code, see its integrated Gekko extension (developed by the Gekko editor): see under 'Extensions' and search for 'Gekko'. For Sublime Text, see these open-source modules for Sublime and Gekko integration (including remote control).
option interface edit style = gekko;
option interface remote = no;
option interface remote file = '';