I made a nother BAJA mod. It is what Beta was trying to make but inproved...
RE: BAJA mod by me.
BY: Hkb to All on Thu Nov 05 1998 02:01 pm
I made a nother BAJA mod. It is what Beta was trying to make but inproved
Which one that I was trying to make?
jBeta
!INCLUDE SBBSDEFS.INC
compare_ars FLAG 1 Y
if_false
compare_ars FLAG 1 N
if_false
yes_no "There are doors that might offend people do you want access to them? if_true
TOGGLE_USER_FLAG 1 Y
RE: BAJA mod by me.
BY: Hkb to Beta on Sat Nov 07 1998 08:27 pm
!INCLUDE SBBSDEFS.INC
compare_ars FLAG 1 Y
if_false
compare_ars FLAG 1 N
if_false
yes_no "There are doors that might offend people do you want access to th if_true
TOGGLE_USER_FLAG 1 Y
Where are you end_if statements?
TK
If you look close I am useing
else
insted of end_if.
The one that restricted people to doors.
Here it is.............
!INCLUDE SBBSDEFS.INC
compare_ars FLAG 1 Y
if_false
compare_ars FLAG 1 N
if_false
yes_no "There are doors that might offend people do you want access to them? if_true
TOGGLE_USER_FLAG 1 Y
print "You have access to them, you will only see this once..."
else
print "You are restricted to some programs."
TOGGLE_USER_FLAG 1 N
If you look close I am useing
else
insted of end_if.
Todays lesson in Baja and the END_IF. I have missed this myself, a
um, you still gotta put your end_if at the end to tell the compiler that you are no longer doing if/then stuff.
(I'm not BSing, its the same in qb...)
END_IF
This function is used to terminate an IF_... or ELSE code block. Every IF_... function must be followed by an ELSE or END_IF instruction, and every
ELSE function must be followed by an END_IF.
RE: BAJA mod by me.
BY: Hkb to Beta on Sat Nov 07 1998 08:27 pm
!INCLUDE SBBSDEFS.INC
compare_ars FLAG 1 Y
if_false
compare_ars FLAG 1 N
if_false
yes_no "There are doors that might offend people do you want access to if_true
TOGGLE_USER_FLAG 1 Y
Where are you end_if statements?
TK
If you look close I am useing
else
insted of end_if.
because Rob's BAJA Manual is very vague about that (it, in fact, _implies_ t an "else" ends an 'if/then' thing without an "end_if" - sort of - you have t
See what I mean though? It does kinda imply that the "ELSE" can be used to terminate an 'if/then.'
What about:
compare_ars NOT $F1Y AND NOT $F1N
if_true
yes_no....
END_IF
This function is used to terminate an IF_... or ELSE code block. Ev IF_... function must be followed by an ELSE or END_IF instruction, and e
ELSE function must be followed by an END_IF.
<sigh>
Oh, well....I guess it's good that my BAJAs are redundant as Gertrude Stein See what I mean though? It does kinda imply that the "ELSE" can be used to terminate an 'if/then.'
Ah. I'm glad you pointed that out since it's always been a dilemma for me because Rob's BAJA Manual is very vague about that (it, in fact, _implies_ t an "else" ends an 'if/then' thing without an "end_if" - sort of - you have t
END_IF<sigh>
This function is used to terminate an IF_... or ELSE code block. Eve IF_... function must be followed by an ELSE or END_IF instruction, and ev
ELSE function must be followed by an END_IF.
Oh, well....I guess it's good that my BAJAs are redundant as Gertrude Stein! See what I mean though? It does kinda imply that the "ELSE" can be used to terminate an 'if/then.'
See what I mean though? It does kinda imply that the "ELSE" can be used terminate an 'if/then.'Yes, an ELSE can terminate an if_then, but then the ELSE need an end_if.
because Rob's BAJA Manual is very vague about that (it, in fact, _implies an "else" ends an 'if/then' thing without an "end_if" - sort of - you hav
The manual very plainly states that an ELSE can end an if/then statement but the else statetment still requires an end_if.
Yes, an ELSE can terminate an if_then, but then the ELSE need an end_if.
Well really if_true and yes_no is the same statement. The difference bein
It depends on the context from which viewed how one might interpret the phrasing. My experience of Rob's Manual language is it's vagueness, omitted detail, and assumption of prior knowledge. It's easy to say, after one's to
I think, even risking redunancy, that instruction should have been made clea in the manual.
IF_YES
give_user_1000000_ducks
ELSE
give_user_mud_pie
END_IF
this is the structure that I was taught in class.
this is the structure that I was taught in class.
You took a class in BAJA? They don't have END_IF's in QBasic last I checked. (I'm rusty though...)
this is the structure that I was taught in class.
You took a class in BAJA? They don't have END_IF's in QBasic last I chec (I'm rusty though...)
They do, very much so. LOOP, and many other commands won't work unless a EN is after a IF/ELSEIF/ELSE. Also QB 4.5 and better gets mad at you... :)
In C, <duck> END_IF's aren't needed in normal code because everything is don in blocks of code which are started and ended by { and } "curly-braces". For
Sysop: | Ragnarok |
---|---|
Location: | Dock Sud, Bs As, Argentina |
Users: | 136 |
Nodes: | 10 (0 / 10) |
Uptime: | 06:40:11 |
Calls: | 15,171 |
Calls today: | 4 |
Files: | 19,857 |
D/L today: |
7 files (164K bytes) |
Messages: | 1,691,380 |