Hi all, Thanks for your comments. I will look into both XREF and QREF which I have on my system.
My latest thoughts are that perhaps we can combine the best of both worlds. We can continue to have default values of zero in the case of locals, while at the same time give an error if no value is available. Any global variables used will need to be initialised. Locals do get initialised and so are seen as bona fide variables. Looking at the SB name table, this is easy to see, even using SBASIC. Using Turbo toolkit, a "type" function can be defined as ... DEFine FuNction type(var) LOCal var$(127) var$ = PARNAM$(1) RETurn BASIC_B%(BASIC_L(24)+BASIC_INDEX%(var$)*8) END DEFine type This function returns 2 if var has a value, else zero. By giving an error, this will trap both spelling mistakes and also variables accessed out of scope. Michael Bulford _______________________________________________ QL-Users Mailing List