Using GOTO to DRAWBMP doesn't

Discussions about the Liberty BASIC language, with particular reference to LB Booster
Tasp
Posts: 16
Joined: Sun May 31, 2020 4:51 pm

Using GOTO to DRAWBMP doesn't

Post by Tasp »

Come across this little oddity.

LB will draw a bmp at the location of the pen, LBB will not. Not sure if this is an intended feature for LB or not, but it caught me out so posting for anyone else.

Code: Select all

'I work in LB only
#1.gb,"UP ; GOTO 200 200; DOWN ; drawbmp name.bmp"

Code: Select all

'I work in both LB and LBB
#1.gb, "DRAWBMP name.bmp 200 200"
[\code]
guest
Site Admin
Posts: 197
Joined: Tue Apr 03, 2018 1:34 pm

Re: Using GOTO to DRAWBMP doesn't

Post by guest »

Tasp wrote: Wed Mar 03, 2021 6:39 pmLB will draw a bmp at the location of the pen, LBB will not. Not sure if this is an intended feature for LB or not, but it caught me out so posting for anyone else.
Please see the LB Help manual. You will find it says this: 'print #handle, "drawbmp bmpname x y". This command draws a bitmap named bmpname ... at the location x y'. Note that the parameters x and y are not optional, they must be specified.

What you have described is an undocumented feature of LB and therefore it could do anything (or nothing). You should not use it, and you certainly cannot expect LBB to behave the same way.
Tasp
Posts: 16
Joined: Sun May 31, 2020 4:51 pm

Re: Using GOTO to DRAWBMP doesn't

Post by Tasp »

Completely agree, this is undocumented within LB. But is used quite frequently by its programmers.

This is purely here to serve as reference point for anyone else getting caught out.

As I said, not sure that this is an intended feature of LB or whether LB just allows it to happen.

Often any "issues" that come up with LBB is actually because LBB is following the rules.
guest
Site Admin
Posts: 197
Joined: Tue Apr 03, 2018 1:34 pm

Re: Using GOTO to DRAWBMP doesn't

Post by guest »

Tasp wrote: Thu Mar 04, 2021 4:28 pm Completely agree, this is undocumented within LB. But is used quite frequently by its programmers.
If it's "used quite frequently" by programmers how did they find out about it in the first place? Is there an online reference to 'undocumented' LB features?
Tasp
Posts: 16
Joined: Sun May 31, 2020 4:51 pm

Re: Using GOTO to DRAWBMP doesn't

Post by Tasp »

guest wrote: Thu Mar 04, 2021 4:57 pm Is there an online reference to 'undocumented' LB features?
Of course, but it's a super secret club that only a few can join. It's just passed the rabbit hole on the left.

But I would assume, like most things it was found or stumbled upon by accident and proliferated it's use via snippets and code suggestions on the LB forum.
It's clearly not intended but LB has some odd quirks.