EnglishEnglishFrancais
[ղ] [RSS] [ӡ] [ֺţ С ]

ֱԵ 

ߣ    ITԴվԭ        ʱ䣺2012-8-2

ֳñԵıȽ

____ԶƵĻϤһֱԾͿ׵ؽֱԵ֪ʶӦõȥǾͽFoxproBasicC\CPascal⼸ֳԵһЩһȽϣԷܸõıȽѧϰ⼸ԡ

1.ִСдFoxproBasicDzִСдıԣPascalC\CijЩҪִСд

2.˵ֵ浽ñʱFoxproBasicñPascalC\Cʹijǰȷ

3.ֵ䣺FoxproBasicC\Cʹá=ֵ;PascalҪڡ=ǰӡ

4.IF ֱԶṩȵIFܡ

FoxproIF nCnt

nTot=nTotnCnt

nCnt=nCnt1

ENDIF

Basic if nCnt

nTot=nTotnCnt

nCnt=nCnt1

Endif

Pascal if nCnt



begin

nTot:=nTotnCnt;

nCnt:=nCnt1;

end

C\C if (nCnt>br>
{nTot=nCnt;

nCnt;}

5.ֵݷʽݲ ÿԶԴֵķʽݲ

6.FORѭÿֱԶṩFOR䣻C\ Cforʽ

FoxproFOR n=1 TO 10

?n

END FOR

Basic For n=1 to 10

print n

Next n

Pascal for n:=1 to 10 do

writeln(n);

C\C for (n=1;n<11;n)

printf(d\nn);

7.WHILEѭ ÿֱԶṩȵWHILEѭܡ

FoxproDO WHILE n<100

n=nn

ENDDO

BasicWhile n<100

n=nn

Wend

Pascalwhile n<100 do

n:=nn;

C\Cwhile (n<100)

n=n;

8.CASE䣺ֻPascalCASEвṩĬ䡣

FoxproDO CASE

CASE n=0

?Zero

CASE n<0

?Pos

OTHERWISE

?Neg

ENDCASE

Basic Select Case n

Case 0

PrintZero

Case Is>0

PrintPos

Case Else

PrintNeg

End Select

Pascal case n of

0:writeln(Zero);

1:writeln(One);

end

C\Cswitch(n)

{

case 0:printf(Zero/n)

break;

case 1:printf(One/n);

break;

default:printf(?\n):

}

[LM]

 

 

[ղ] [RSS] [ӡ] [ֺţ С ]
Ϊҳ | | Ժ | ѧУͼ | ҷֲ | ˳· | ϵʽ | |