PDA

View Full Version : [Q] Boolean flags



msemtex
07-29-2013, 12:48 AM
Hi, I want to know how to make use of boolean flags in simba. The flags are to be used to flag when the bank is successfully opened

e.g.

Java Example




bool boolFlag= false;

if(accessBank = true)
{
boolFlag = true;
}

if(boolFlag = true)
{
depositInven();
}

Flight
07-29-2013, 01:08 AM
Well you could go about this a couple of ways:

if aBoolean then
Writeln('A true boolean!')
else if not aBoolean then
Writeln('It is false...');

if (aBoolean = True) then
Writeln('A true boolean!')
else if (aBoolean = False) then
Writeln('It is false...');


If you'd like a little more info on the subject you can check out this post (http://villavu.com/forum/showthread.php?t=51174) but I don't think it's very relevant to your question.

DrChill
07-29-2013, 01:57 AM
It should be called a boolean variable, or perhaps boolean value, but not flag. AFAIK flags are only when you call a program via a text command e.g.:

hackplanet.exe -target:world
-target:world would be considered the flag part of the command