# # example of GAP code which could be used instead of 'Read'. # It reads files with comments in form of '%COMMENT' and '%ENDCOMMENT' # in the following sense: # Any line beginning %COMMENT will be ignored as will all subsequent lines # up to and including a matching %ENDCOMMENT line (ie %COMMENT and # %ENDCOMMENT nest) # # To test this, try both # Read("/home/wdj/gapfiles/ReadNC_example.gap"); # this will return some GAP # # syntax error messages # and try # ReadNC("/home/wdj/gapfiles/ReadNC_example.gap"); # ################################################################## Read("/home/wdj/gapfiles/ReadNC.gap"); #replace by your own path to ReadNC.gap Print("\n This examples tests `Read` and `ReadNC` in GAP.\n"); %COMMENT Print("\n But GAP does not read commands within %COMMENT - %ENDCOMMENT blocks.\n"); %ENDCOMMENT Print("\n GAP reads commands outside %COMMENT - %ENDCOMMENT blocks.\n\n"); ########################################################### gap> Read("/home/wdj/gapfiles/READ_example.gap"); This examples tests `Read` and `ReadNC` in GAP. Syntax error: expression expected in /home/wdj/gapfiles/ReadNC_example.gap line 21 %COMMENT ^ Syntax error: expression expected in /home/wdj/gapfiles/ReadNC_example.gap line 25 %ENDCOMMENT ^ gap> READ("/home/wdj/gapfiles/ReadNC_example.gap"); This examples tests `read` and `ReadNC` in GAP. GAP reads commands outside %COMMENT - %ENDCOMMENT blocks. true gap> Read("/home/wdj/gapfiles/ReadNC_example.gap"); This examples tests `read` and `ReadNC` in GAP. GAP reads commands outside %COMMENT - %ENDCOMMENT blocks.