'rem -> //rem
a=5 mod 2; -> a=5 % 2;
標準組み込み関数は小文字化でそのまま
Int(2.4)
-> int(2.4)
Str$(7) -> str(7)
DIM as(24,10) -> int as[24][10];
DIM s$(10) -> String s[10];
DIM
s(10) As String -> String s[10];
PRINT "abc" -> printf("abc\n");
PRINT "abc"; -> printf("abc");
INPUT a -> gets(a);
FOR I=1 TO 10 STEP 2
Exit For
NEXT
↓
for
(i=1;i<=10;i+=2) {
break;
}
IF a=1 AND b<>2 OR c<3 THEN
ELSE
ENDIF(End If)
↓
if (a==1 && b!=2 ||
c<3) {
} else {
}
WHILE a=1 -> while (a==1) {}
WEND
Do While a=1
Exit Do
Loop
↓
while (a==1) {
break;
}
*以下Publicの場合も同様です。
Private Sub
test(a As Integer)
Exit Sub
End
Sub
↓
void test(int a) {
return;
}
Private Function test(a As
Integer) As String
test="abc"
End Function
↓
String test(int a) {
return
"abc";
}
FUNC test(a$)
ENDFUNC b
↓
int test(String a) {
retuen b;
}
SELECT CASE a
CASE 1:
END SELECT
↓
switch (a) {
case 1:
break;
}