Shouldn't this debug 0 or "False"? I noticed this when I was converting a program from Blitz Basic and it didn't work.
PureBasic only allows comparison operators in 'If/ElseIF/EndIf' and in the expressions of the 'While/Wend' and 'Repeat/Until' commands. It is also possible to sneak them in a few other places, though it is unsupported and must be done carefully.
With your example, the value displayed by Debug is the right side of the expression 'a <> 1' because conditionals aren't supported in an assignment statement. This means it is not a bug, you're expecting the code to do something that is unsupported at this time.
Look here for some discussion on unsupported tricks to sneak comparisons into other places (for now).
Last edited by Demivec on Sat Jun 14, 2008 5:24 pm, edited 1 time in total.
Thanks for the quick reply. PureBasic certainly is an idiosyncratic language. I guess I should have tried the demo, but I can't stand crippleware. I bought it on the basis that there are so many satisfied customers... and I hear it was spawned by Blitz... well I'm fairly happy so far anyhow.
Thanks for the quick reply. PureBasic certainly is an idiosyncratic language. I guess I should have tried the demo, but I can't stand crippleware. I bought it on the basis that there are so many satisfied customers... and I hear it was spawned by Blitz... well I'm fairly happy so far anyhow.
Once I tried it I knew it was the language I was looking for. The idiosyncracies took a little bit of time for me to get use to, but that is true of anything. I was most challenged by the terminology used to described different aspects of the language, not by the language itself.
As you become more familiar with the language you will find there is a great deal of information on these forums. If you search you will often find that something you're interested in has been discussed (and just as often, solved) many times already.
@Edit: ...a belated welcome also.
Last edited by Demivec on Sat Jun 14, 2008 5:26 pm, edited 1 time in total.
My favourite thing about PB so far is the freedom - it doesn't try to shelter the user from all the pointer/assembly type stuff like BB used to... BB was so restricting... and I took one look at BlitzMax and thought the syntax was a mess - it looked like it was trying to be three different languages at once - BASIC, Pascal and C++. Urgh.
Having said that, I don't think PB is as "BASIC" as it could be. I imagine if I didn't know what a pointer/array was... I would read the manual and still not know. Could be quite offputting for beginners. There should be an "absolute beginners" tutorial included.
PS Sorry for not searching the forum for my operators question. I guess I am impatient sort of person.
the pointers topic is only ~mentioned~ in the Manual, and it's said "for experienced users".
the thing is, playing with pointers is nothing for beginners, so it would be in the wrong place in an "absolute beginners" manual.
it would be a nice topic in a "so, now I am advanced, now I can start messing with pointers and programming my last nerve off"-tutorial..