PDA

View Full Version : /* Remark lines (Great work!) */



chliu
08-03-2012, 04:45
Can thinBasic use multi-lines remark in the future?
Like c/c++:
/* i write x86 assembly, c/c++ , qb45,vb6
and i just hate to write vb.net, python,tcl...

sub xxxx() '// temp ignore this sub
...
end sub

If the sub is lengthy then we don't have to put ' line by line.
*/

It may be a little hard for the parsing work, but
this is what I have been wishing long before.

But anyway thinkBasic is absolutely what I want.
I have been looking for a good scripting language for windows for a long time.
It should have earned more notice then others (python, tcl...).
Thanks for all you (the team members) have done.
Great work!

ErosOlmi
08-03-2012, 05:06
Some C like commenting is possible
see help at http://www.thinbasic.com/public/products/thinBasic/help/html/commenting_the_code.htm

zak
08-03-2012, 06:13
i haven't noticed
/*
....
....
*/
before. and i am joined from Dec 2008 , may be i saw it a million of times without focusing on it or or allowing it to sail in my awareness circle. this is a great feature, thanks.

ErosOlmi
08-03-2012, 08:41
:D
there are a lot of features/tricks/functionalities in thinBasic
I too sometimes forget about some of them

chliu
08-03-2012, 08:52
Thank you for your hint, Eros. I should have paid more attention on the help doc.

Another question:
Will the remark lines or the length of sub/function/variables names affect the
efficiency (adding execution time) of thinBasic?

ErosOlmi
08-03-2012, 09:12
No problem, thinbasic help is quite big and a bit not well organized in some parts
so just ask and we will be happy to reply
you will never find here something like RTFM :)

Your question: no there should be no slow down due to comments or length of names
Thinbasic has a pre-parsing phase in which all (well ... Most) of the tokens are identified and stored as hashing value of the runtime hashing tables: keywords, variables, subs/functions, even UDT elements.
During execution most of the tokens are already known and access to data is direct using such hash tables.

In any case, because optimization is one of the key point of my thinbasic developing, if you find situations where you feel something slow down runtime execution, just post some code and I will be happy to check it

Ciao
Eros

PS: I like long names and great comments in code.
I hate variable names like: i, k, j, ....
But I know: it is my problem :D