Older Version
Newer Version
tsh73
Jan 7, 2015
=Variables challenge= Thread: [[http://libertybasic.conforums.com/index.cgi?action=display&board=contests&num=1418803980&start=0#1419329462|LB forum\Contests\Variables]] Original post (Rod, Dec 17th, 2014, 02:13am): ---- > Here is a little task for the seasonal break. Write a program using Liberty BASIC 4.50 beta 3 that will list the names of all variables used in any program submitted to it. The list can be a simple list or something more ordered its up to you. > This will help beta test our new version of Liberty. Code should be ready for the first week of the new year. > http://www.libertybasic.com/lb45b3setup.exe ---- ==Entries:== ===by MKnarr=== http://users.sisna.com/jbross/lbreader.zip ---- > I would like to submit a program I wrote several years ago in LB 4.04 and have now saved it with version 4.5 beta 3. It includes string and numeric reserved > keywords words that are new in version 4.5. > It not only finds all the string and numeracy variables in any program but arrays, handles, labels, goto, gosub and subs and function names. > It is in a zip file because it contains bitmaps etc. ---- ===[[http://libertybasic.conforums.com/index.cgi?action=display&board=contests&num=1418803980&start=7|Entry by Rod]]=== ---- > I'm travelling soon and out of time. This has bugs but the task is for fun, it shows you can do a lot for yourself. I hope to see how other folks have tackled it. Save the code as varlist.bas and it will analyse itself. ---- ===[[Entry by tsh73]]=== ---- > It's got too big to put it on a forum. Actually, I tried to do a tokenizer so it figures out all things including numbers and strings. But after figuring things out it outputs only things that relevant to this task (variables, subs/user functions, labels). > Uses keyword list etc from Rod's entry. ----