common blocks are displayed in HELP even though not declared.
Status: Beta
Brought to you by:
m_schellens
The routine loadct declares a common block that would presumably be used only
by certain routines. The common block's existence, though, is revealed by the HELP routine and so it clutters the HELP output:
GDL - GNU Data Language, Version 0.9.5+ 2015.03.20 {gvj}/f/gdl/+ (f77 fix) - For basic information type HELP,/INFO - Please report bugs, feature or help requests and patches at: http://sourceforge.net/projects/gnudatalanguage/ % Compiled module: PATH_SEP. GDL> loadct,12 % Compiled module: LOADCT. % LOADCT: Loading table 16 LEVEL GDL> help % At $MAIN$ B_CURR (COLORS) BYTE = Array[256] B_ORIG (COLORS) BYTE = Array[256] GDLLIB STRING = 'D:/programs/gnudatalanguage/lib' G_CURR (COLORS) BYTE = Array[256] G_ORIG (COLORS) BYTE = Array[256] O ULONG = 1 R_CURR (COLORS) BYTE = Array[256] R_ORIG (COLORS) BYTE = Array[256] TSTLIB LONG = 31 Compiled Procedures: $MAIN$ LOADCT Compiled Functions: PATH_SEP GDL> #help Internal PROCEDURE : HELP,[inf. Args],ALL_KEYS,BRIEF,CALLS,DEVICE,FUNCTIONS,HELP,INFO, INTERNAL_LIB_GDL,KEYS,LAST_MESSAGE,LIB,MEMORY,NAMES,OUTPUT,PATH_CACHE,PREFERENCES, PROCEDURES,RECALL_COMMANDS,ROUTINES,SOURCE_FILES,STRUCTURES,SYSTEM_VARIABLES,TRACEBACK GDL> print,r_orig[40] % Variable is undefined: R_ORIG % Execution halted at: $MAIN$ GDL>
Nevertheless it would be useful to see common blocks that have been created, so a
HELP,/COMMON option would be interesting.
I've implemented "HELP,/COMMON" as an option alongside the no-parameter
call. See next post for the implementation.
Last edit: GregJung 2015-05-10
I've now implemented /COMMON, /FULL, and /NAMES in help,
as well as .RNEW fro $MAIN$
and command DELVAR. Expect these to be in CVS soon after today. (May 10).
I don't have an IDL to compare behaviors with, so please comment on any divergences.
Demo session:
In this session I've just started up and ran test_tv, which (via loadct) initiates the
COLORS common block - although not visible to the $MAIN$ until declared.
/common is a new keyword to help the user find the internals he/she has compiled.
Normally the help will not list these variable because they are not defined in the subroutine. What you see as variables were created in my startup routine:
When a common block is declared in $MAIN$ then help will report it along with the other variables, in alphabetical order
; Multiple main programs may have been created with multiple name choices in the same
common block. Therefore RNEW will remove these references also as well as the un-attached variables.
Last edit: GregJung 2015-05-10
Closing as this is addressed here: https://github.com/gnudatalanguage/gdl/pull/160