Search found 44 matches

by tsh73
Sun Feb 03, 2019 9:09 pm
Forum: Compatibility with LB4
Topic: JB/LB BMPSAVE make 32 bit BMP, LBB 24 bit
Replies: 0
Views: 15430

JB/LB BMPSAVE make 32 bit BMP, LBB 24 bit

When trying to run "Laser cut" program I hit this. Program was initially written for JB so it saved single pixel BMP -read back that BMP - read that pixel data, returned that as color. So JB/LB write 32-bit BMP (or 16-bit, if desktop is set to 16 bit) (may be not always but in my case it w...
by tsh73
Sun Feb 03, 2019 9:02 pm
Forum: BASIC code examples
Topic: Laser cut visual effect
Replies: 2
Views: 11388

Laser cut visual effect

'Laser engraving (look-alike) 'tsh73 'Jan 2019. Feb 2019 - with GetPixelAPI for LB nomainwin open "Laser engraving" for graphics_nsb_nf as #gr #gr "trapclose [quit]" handleg =hwnd( #gr) calldll #user32, "GetDC", handleg as ulong, hDC as ulong #gr "down" #gr &...
by tsh73
Fri Sep 14, 2018 8:20 pm
Forum: Compatibility with LB4
Topic: math range errors in EVAL not raised/bogus results
Replies: 1
Views: 8072

math range errors in EVAL not raised/bogus results

(tripped upon while working on chart library viewtopic.php?f=11&p=154#p154 ) I was going to change function evalFuncX(f$,x)) so in case of math range error it returned magic number. So I could omit these ranges. But it seems LBB has problems reporting such errors from EVAL - no errors happens, w...
by tsh73
Fri Sep 14, 2018 7:55 pm
Forum: Compatibility with LB4
Topic: handle variable with a dot not supported
Replies: 0
Views: 12698

handle variable with a dot not supported

(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. some.var$="some...
by tsh73
Fri Sep 14, 2018 7:43 pm
Forum: Compatibility with LB4
Topic: difference in USING overfill
Replies: 0
Views: 12700

difference in USING overfill

(tripped upon while working on chart library http://lbbooster.com/forum/viewtopic.php?f=11&p=154#p154 ) LBB reacts on PRINT USING overfill (that is, number too big to fit to allotted space) differently from LB: print using ("#.##", 1/3) print using ("#.##", 100/3) LB: 0.33 %3...
by tsh73
Tue Sep 11, 2018 12:29 pm
Forum: BASIC code examples
Topic: chart library, kind of
Replies: 1
Views: 7860

chart library, kind of

Chart library started with JB long long time ago made work with LB (today) made work with LBB (kind of) differences encountered: *in LBB, handle variables with a dot ("topName.handle$") not supported *in LBB, overfill of USING produces "???" instead of %123.4 print using ("#...
by tsh73
Thu Jun 28, 2018 10:01 pm
Forum: Liberty BASIC Language
Topic: MOD speed
Replies: 6
Views: 11386

Re: MOD speed

So few interesting things I got from it 1) newer computer at my workplace works about 2x faster then my old home one But different constructs differ in speed gain 2) I was coding "getting digits from a number" as nn = 987654321 while nn d=nn mod 10 'print d nn=int(nn/10) wend That explains...
by tsh73
Thu Jun 28, 2018 9:29 pm
Forum: Liberty BASIC Language
Topic: MOD speed
Replies: 6
Views: 11386

Re: MOD speed

My code had a bug, AND the idea of counting down from the largest possible integer is ridiculous. I still think idea is Ok. We need larges number - so first one that fits would work. The only problem is that it happens very-very afterwards... But how can one be CERTAIN that no nine-digit integer wi...
by tsh73
Wed Jun 27, 2018 9:52 pm
Forum: Liberty BASIC Language
Topic: MOD speed
Replies: 6
Views: 11386

Re: MOD speed

Jack, you program instantly (!) said What is the largest integer that contains all different, non-zero digits; and such that each digit is evenly divisible into the integer? The answer is 987654312 Program Completed. Now 987654312 surely not divisible by 5 so there are some errors in a program. As a...
by tsh73
Sat Jun 23, 2018 10:24 pm
Forum: Liberty BASIC Language
Topic: MOD speed
Replies: 6
Views: 11386

MOD speed

Hello all (a bit of long story) Recently there was a task posted at LB forum http://libertybasiccom.proboards.com/thread/241/challenge-easy-task-fast Basically, it lead me to writing a program with long calculation involving MOD I made some assumptions as to how to reduce search, and got right answe...