プレイ日記
Kl'Dck Hul HissingToaster
'IF GOTO' exists?!? Oh... Oh no...
1そうだね
プレイ済み
返信[1]
親投稿
Oscar PwnageBlock
IF <condition> GOTO <@label> does exist, but using it is a bad programming practice.
0そうだね
プレイ済み
返信[2]
親投稿
MathPRG MathProgrammer
For BASIC at least. In C it would be written as: #include <studio.h> int main( void ) { if(condition) { goto label //or variable=Function(); } return 0; }
0そうだね
プレイ済み
返信[3]
親投稿
MathPRG MathProgrammer
Fun fact on a different programming language. I primarily use SmileBASIC right now but C is my second most used xD
0そうだね
プレイ済み
返信[4]
親投稿
MathPRG MathProgrammer
Ash! Autocorrect changed #include <stdio.h> to studio.h! Darn it, I'm ruined!
1そうだね
プレイ済み
返信[5]
親投稿
Oscar PwnageBlock
You probably already noted, but that is because the THEN of an IF statement in C is silent. It's only ever represented by brackets. (Or doesn't appear at all when writing next-line statements, which are also a bad programming practice.)
0そうだね
プレイ済み
返信[6]
親投稿
MathPRG MathProgrammer
Yes, however many tutorial books still use them with one line if there is only one function to execute in such a case. Of course, it makes perfect sense that the braces would represent the THEN, because they borh say what to execute should if() find the condition return a value other than 0.
0そうだね
プレイ済み
返信[7]
親投稿
MathPRG MathProgrammer
I forgot an S at the end of return, and put an r in both! I am having a bad grammar/spelling day!
0そうだね
プレイ済み
返信[8]
親投稿
MathPRG MathProgrammer
And autocorrect changed Aah to Ash... Darn!
0そうだね
プレイ済み
返信[9]
親投稿
MathPRG MathProgrammer
And there is no IF statement in C, capitalization is a key thing to remember in C. It's mostly the inverse of BASIC, your commands are usually entirely lowercase, and there is a difference between a variable named 'count' and another called 'COUNT'. Usually uppercase is used for constants. Sorry for being so precise... ;)
0そうだね
プレイ済み
返信[10]
親投稿
Kl'Dck Hul HissingToaster
@Oscar: Its very close to assembly branch instructions, which I guess BASIC is supposed to be close to... SUB A, B BNE A, 12345 @MathPrg: Fun fact: The '{}'s are part of their own grammar definition in C, unlike SB where THEN really does terminate the condition. <IF>(<EXPRESSION>)<BLOCK>(<ELSE>...)* <WHILE>(<EXPRESSION>)<BLOCK>
0そうだね
プレイ済み
返信[11]
親投稿
MathPRG MathProgrammer
Looks like you've also got some good programming experience... I've messed around with a few extras, my first language I actually committed to learning at all was HTML. I also tried Visual Basic, JavaScript, Java, C, Batch files, Petit Computer's SmileBASIC, of course this SmileBASIC, and C++. Maybe more but I can't remember any others... It's a bit late for me to remember THAT far back...
0そうだね
プレイ済み
返信[12]
親投稿
MathPRG MathProgrammer
WAIT A MINUTE... just after I bug Is at about the need to pay attention to capitalization in programming, YOU FORGOT TO CAPITALIZE THE 'R' AND 'G' IN MY NAME?! OF ALL THE UNFORGIVABLE THINGS... YOU SHALL FOREVER BE SHUNNED BY ME! Lol :P
0そうだね
プレイ済み
返信[13]
親投稿
MathPRG MathProgrammer
OSCAR!!! Not Is, what is my autocorrect doing?
0そうだね
プレイ済み
返信[14]
親投稿
Lumage Lumage
Ayyy Kldck is back?
0そうだね
未プレイ