handle variable with a dot not supported

Discussions relevant to the differences between LBB and LB4 which could affect code compatibility
Post Reply
tsh73
Posts: 36
Joined: Fri Apr 06, 2018 7:58 pm

handle variable with a dot not supported

Post by tsh73 » Fri Sep 14, 2018 7:55 pm

(tripped upon while working on
chart library
viewtopic.php?f=11&p=154#p154
)

LBB as LB allows using (.) in names of variables
But it doesn't allow using such variable as handle variable
In following example, LB produces 3 circles
while LBB errors on 3rd circle, compile-time.

Code: Select all

some.var$="some variable"
print some.var$ 'no problem

handle1$="#main.gr"
thisIs.handle2$="#main.gr"
print handle1$ 'no problem
print thisIs.handle2$ 'no problem

graphicbox #main.gr, 10, 10, 300, 300
open "test" for window as #main
#main "trapclose [quit]"
#main.gr "down; home"

'using native handle
#main.gr "circle 30"

'using handle variables
#handle1$ "circle 40"

#thisIs.handle2$ "circle 50"    'errs here with "unknown handle"

#main.gr "flush"
wait

[quit]
    close #main
    end

Post Reply