Search found 3417 matches

by Little John
Mon Jun 21, 2021 12:33 am
Forum: Bugs - C backend
Topic: [Done] Boolean simple empty string
Replies: 10
Views: 3569

Re: Boolean simple empty string

Empty string validation can be simply, quickly and safely done like this:

Code: Select all

If Asc(s$) = 0
or

Code: Select all

If Asc(s$) = ''
by Little John
Sun Jun 20, 2021 6:31 pm
Forum: Bugs - C backend
Topic: [Done] Boolean simple empty string
Replies: 10
Views: 3569

Re: Boolean simple empty string

Yes, of course it should be evaluated the same. But I didn't write about that. I just wrote that I don't like it. Bool(s$) doesn't make sense, and s$ isn't a Boolean expression. Something like Bool(s$ <> "") does make sense, though. Same when using If . Technically speaking, Bool(s$) works...
by Little John
Sun Jun 20, 2021 5:12 pm
Forum: Bugs - C backend
Topic: [Done] Boolean simple empty string
Replies: 10
Views: 3569

Re: Boolean simple empty string

skywalk wrote: Sun Jun 20, 2021 4:01 pm I never liked this shorthand.
Me too. A string isn't a Boolean expression.
by Little John
Sun Jun 20, 2021 5:10 pm
Forum: Announcement
Topic: PureBasic 6.00 Alpha 5 released !
Replies: 245
Views: 51386

Re: PureBasic 6.00 Alpha 2 released !

Alpha stage is a good time to make suggestions for improvement, isn't it? :-)
by Little John
Sun Jun 20, 2021 1:36 pm
Forum: Bugs - C backend
Topic: [Done] Boolean expressions with string functions
Replies: 5
Views: 3885

Re: [Done] Boolean expressions with string functions

Fred, in PB 6.0 alpha 2, there are still problems with string functions in a Boolean expression. Debug Bool("Pear" > "apple") Debug Bool("PEAR" > "APPLE") Debug Bool(UCase("Pear") > UCase("apple")) Output when using the ASM backend (all cor...
by Little John
Sun Jun 20, 2021 12:47 pm
Forum: Bugs - C backend
Topic: [Done] PB 6.0 alpha 2: duplicate label
Replies: 1
Views: 2544

[Done] PB 6.0 alpha 2: duplicate label

I have a module named "Math" that works fine with the ASM backend, also with PB 6.0 alpha 2. The file with the module additionally contains some test code. When trying to run the code with the C backend, I get the following error message: --------------------------- PureBasic - Assembler e...
by Little John
Sat Jun 19, 2021 5:34 pm
Forum: Bugs - C backend
Topic: [Done] PB 6.0 alpha 2 - File not found: 'C:\Program.obj'
Replies: 3
Views: 731

[Done] PB 6.0 alpha 2 - File not found: 'C:\Program.obj'

On Windows 10, I have installed PB 6.0 alpha 2 in the directory C:\Program Files\PureBasic_6\ As compiler, I have selected the new C backend, that is C:\Program Files\PureBasic_6\Compilers\pbcompilerc.exe Even when I try to run some simple code such as Debug "Hello World" I get the followi...
by Little John
Sat Jun 19, 2021 5:08 pm
Forum: Announcement
Topic: PureBasic 6.00 Alpha 5 released !
Replies: 245
Views: 51386

Re: PureBasic 6.00 Alpha 2 released !

If you compile for 32- and 64-bit, you must also add the respective compiler. No, you _can_ do so (that's fine), but _must_ is wrong. I have installed both PB 32 bit and PB 64 separately from each other, so for me there is no need to do that. Then you can create a project with multiple targets, ......
by Little John
Sat Jun 19, 2021 4:30 pm
Forum: Announcement
Topic: PureBasic 6.00 Alpha 5 released !
Replies: 245
Views: 51386

Re: PureBasic 6.00 Alpha 2 released !

Thank you!
However, this is unnecessarily cumbersome.
There should be a built-in compiler option, which allows to choose between ASM backend and C backend.
by Little John
Sat Jun 19, 2021 4:12 pm
Forum: Announcement
Topic: PureBasic 6.00 Alpha 5 released !
Replies: 245
Views: 51386

Re: PureBasic 6.00 Alpha 2 released !

Hi,

I'd like to test PureBasic 6.00 Alpha 2.
How can I tell the compiler to use the new C backend?
I can't find a corresponding item in the compiler options.
by Little John
Mon Jun 07, 2021 5:53 am
Forum: Off Topic
Topic: We serve vegetarians
Replies: 26
Views: 8216

Re: We serve vegetarians

idle wrote: Mon Jun 07, 2021 12:29 amSo I was at a local eatery and overheard this hipster guy asking the waiter "I'm vegan what do you recommend" and the waiter replied with "a Taxi"
:lol: :lol:
by Little John
Sun Jun 06, 2021 7:38 pm
Forum: Off Topic
Topic: We serve vegetarians
Replies: 26
Views: 8216

We serve vegetarians

Image
by Little John
Sun Jun 06, 2021 1:08 pm
Forum: Announcement
Topic: HTML5 Browser
Replies: 193
Views: 69870

Re: HTML5 Browser

I'm still using your program as a lightweight portable browser on a USB pen drive.
Thank you very much for the update!
by Little John
Wed May 19, 2021 11:02 am
Forum: Tricks 'n' Tips
Topic: StringField alternatives with list or array
Replies: 8
Views: 1382

Re: StringField alternatives with list or array

@idle: You can further improve the Array version if you change the Redim to double (or 1.5) the size of the array everytime it gets too small instead of increase its size only by 1 per loop. See also here: https://cs.stackexchange.com/questions/9380/why-is-push-back-in-c-vectors-constant-amortized ...