
if keyword_set(key) then ...or
if n_elements(key) ne 0 then ...have to be replaced with sap_keyword_set(key). The difference between IDL's keyword_set and sap_keyword_set is that the latter accepts zero as a value and that the value 'NONE' can be used to un-set a keyword explicitly.
A statement
if n_elements(keyword) eq 1has to be replaced with
if sap_keyword_set(keyword) and n_elements(keyword) eq 1.Subroutines that are borrowed from other packages (e.g. IA3) must only be modified if their keywords shall be directly passed from the GUI. See also item 7.
The error handling approach for the interactive ISAP mode (sap_error) is similar to the SWS IA error handling. In particular: programmes return to the main level (RETALL) after occurance of a fatal error. For the GUI this was not sufficient, because there is no way for it to check if an error occured or not. Therefore the IPAC routines have been modified to return to the calling routine (return, not retall) and to provide an error status in a variable (usually called STATUS) in the GUI mode (i.e. if !SAP_GUI is set to 1).
For instance:
status = tippex(aar_in,aar_out,tip_list)
returns 0 if ok, 1 if fatal error.The GUI will then examine the status and continue accordingly.
BUT: I see two problems:
After a call from the main level to a routine which calls a subroutine which calls a subroutine where an error occurs you'll still end up at the main level (and get an error message). But in addition you'll have an error code which can be analyzed by the GUI or other programmes.
I have now modified the arithm and dered routines according to this principle but I will wait with the update of the other MPE routines till we agreed on the above suggestions or alternative schemes. Please let me know what you think.
- First line: ;#> filename.dcx
The blank between ">" and "filename" is mandatory!
x stands for 1 (user level) or 2 (programmer level)
- Second line: ; Identifier filename
......
- ; Category: ISAP
- Last line: ;#<
# # NEW_MODULE # FILES: NEW_MODULE.install FIELS: NEW_MODULE.pro INSTALL: ARITHM.pro UTL_SRC
coco create-module new_module UTL "ISAP: comment" (-w 30 ...)The comment should be a short description of the routine, usually taken from the PURPOSE keyword in the header. You may use other CoCO options such as '-w 30' (wait 30 minutes before communication time out.)
The .dc file goes into a subdirectory DOC.
The .install file will be in INSTALL.
coco reserve-module filename commentAfter modifying it, type:
coco insert-module filename comment