Tip: If/Then in PureBasic!
I already explained why it does not behave similar to VB's then.PB wrote:> Now tell me, where did you see an implementation of then which behaves
> similar to this macro? Big prize if you can!
Here's two implementations: VB and C64. Now, where's my prize?![]()
It is not equal to Commodore 64 Basic V2 because if a then is followed by a line number on Commodore, it is interpreted as a conditional goto, jumping to the line number after then. (In PB this would be a label.)
Note that I'm not saying that this then is useless (well it is, but I'm not saying it (oups)), I simply asked where this version of then came from and no one really knew.
But we all want progress to the better, don't we? So I'm not saying that this macro shouldn't be use because it doesn't match other languages, actually more to the opposite. When the statements are surrounded by parentheses, this prevents errors because there is less confusion of which statements are effected by the if statement and which aren't.
But that doesn't make it's behaviour similar to other languages.
Prize:

quaffing... ah yes, the fine art of spilling beer without drinking it!Dare2 wrote: But if you have a beer to hand, quaff that.
Edit: And shoot rings. Or - ooga booga - club him senseless. He started it.![]()
![]()
and clubbing! loud music, barely dressed girls! flashy lights! and more quaffing!
unless the finer point of your message escaped me... and you were talking about something totally different... <puzzled look>
Last edited by blueznl on Wed Mar 22, 2006 10:28 pm, edited 2 times in total.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
apocalypse is upon us!Dare2 wrote: I was just thinking - a novel approach for me
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
> It is not equal to Commodore 64 Basic V2 because if a then is followed
> by a line number on Commodore, it is interpreted as a conditional goto
True, the C64 can interpret If/Then in that way. But I meant it to be used
in the traditional sense, especially considering that PureBasic doesn't use
line numbers by default.
> I simply asked where this version of then came from and no one really knew
We old-schoolers know perfectly well where it came from.
> Prize:
Thanks!
> by a line number on Commodore, it is interpreted as a conditional goto
True, the C64 can interpret If/Then in that way. But I meant it to be used
in the traditional sense, especially considering that PureBasic doesn't use
line numbers by default.
> I simply asked where this version of then came from and no one really knew
We old-schoolers know perfectly well where it came from.

> Prize:


I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
either that or an emu 
but i DO have a vic20 here, does that count as well?

but i DO have a vic20 here, does that count as well?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
@SFSxOI: I was using this -> www.ccs64.com 
But there's also this online Java version: http://www.dreamfabric.com/c64/

But there's also this online Java version: http://www.dreamfabric.com/c64/
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
http://www.emulator-zone.com/SFSxOI wrote:WoW! I didn't realize that people were still interested in the C-64, at least to the point of actually creating an emulator for it. I had a C-64 (and a Vic-20, and a TI-99, and a TRS-80, and a PET, and an Apple) years ago when they first came out
http://www.viceteam.org/
http://en.wikipedia.org/wiki/List_of_emulators
http://www.wbwip.com/a2web/a2emul.html


(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.