I feel stupid: If Statement?

BlitzMax Forums/BlitzMax Beginners Area/I feel stupid: If Statement?

Apollonius(Posted 2007) [#1]
Well I've looked through the documents and couldn't find anything on IF statement... I'd like to know if this works correctly if else statement.. would it be writen like this?

if expression then
//do this
else
//do this
endif

Is that correct? if not what is the right way ? :)
And dont ask me why i didnt check for myself xD
(cuz i feel stupid for not trying myself but im already here) LOL

where is the info about this in the documents?


GfK(Posted 2007) [#2]
You don't need the 'then' bit.

How the hell have you survived in Blitz for the three years you've been here, without even knowing how to use If/EndIf?? o.O

Information is in the BRL.blitz module docs. Put cursor on a command, hit F1 twice. Bingo.


Floyd(Posted 2007) [#3]
where is the info about this in the documents?


There is actually quite a lot of information in the BlitzMax docs. The challenge is to find what you need.

One of the Help areas is called Language. Look in the Program Flow section.


Apollonius(Posted 2007) [#4]
lol i used to use blitz+ and i havent programmed in Blitz in like a billion years :P

but bmax seems like a very good 2D engine this time
(unlike b+ which i was falsly leaded to belive it could actually make good 2D games :P)


Picklesworth(Posted 2007) [#5]
One nit-picky thing.

You can use End If now, instead of Endif.
I prefer it as two separate words, so do it that way :b


BladeRunner(Posted 2007) [#6]
(unlike b+ which i was falsly leaded to belive it could actually make good 2D games :P)

Oh, they can be done in B+, too. Just a matter of the programmers skills ;)


Apollonius(Posted 2007) [#7]
They can somewhat be done I know, but there's missing way too many things(in commands) for it to be called a 2D game engine. And as for programmer skills, I don't make DLLs when I get something I expect it to live up to standards... (for the freaken price they ask) that engine can't even live up to game maker as far as 2D game engine is concerned. B+ makes me angry LOL.


CS_TBL(Posted 2007) [#8]
Otoh, it's quite low-spec, making it ideal for older systems.


BladeRunner(Posted 2007) [#9]
And it plays matter what you define to be 'good'.
If your vision of a game contains loads of Particles and the like, you'd for shure better take b3d because of the possibilities to use sprites as fast 2d-bobs.
If- on the other hand- you like to do some kind of not-that-graphical-intense game, blitz plus will serve more than enough.
No need to overload the whole thing- but u can do it if you feel to.
But this is of course a personal descission to take. Not everybody loves roses and so it is with coding,too.


GfK(Posted 2007) [#10]
you'd for shure better take b3d because of the possibilities to use sprites as fast 2d-bobs.
Bobs? Blitz can't do Blitter Objects. Or did I misunderstand?


BladeRunner(Posted 2007) [#11]
maybe a problem of my rusty english. I meant you can 'misuse' sprites as fast, alphausing, realtimerotatin and the like 2d-images.