美文网首页
宝蓝与微软的爱恨情仇

宝蓝与微软的爱恨情仇

作者: 杰_6343 | 来源:发表于2022-01-11 10:06 被阅读0次

Borland的诞生和发展 --Borland传奇

——我们要从历史中学会教训

编辑工具的历史

——pasic和delphi都比basic和vb小巧快捷

Pascal大多使用英文字符表示,而C大多使用符号表示

语法 pascal c

区分字母大小写 不区分 区分

模块,复合语句 begin...end; C语言是{...}

逻辑符 and  or  not &&  ||    !

赋值 x:=5; x=5;

比较符 > ,  < ,  = ,  >=,  <=,  <> > ,  < ,  = = ,  >=,  <=,  !=

运算符 +, -, *, div, mod +, -, *, /, %

常用类型 Integer;

Longint;

Int64;

Real;

Double;

Extended;

Boolean;

Int;

Long;

Long long;

Float;

Double;

Long double;

没有。(0为假,1为真)

变量说明 Var a,b:integer; Int a,b;

I:=i+1; Inc(i); I++;

I:=i-1; Dec(i); i--;

输入语句 Read(a,b); scanf(“%d%d”,&a,&b);

输出语句 Write(a,b);

Writeln(a,b); printf(“%d%d”,a,b);

printf(“%d%d\n”,a,b);

条件语句 1 If x=5 then

  Begin a:=1; b:=2 end; if (x= =5)

  { a=1;b=2;}

条件语句2 If x=5 then

  Begin a:=1; b:=2 end

Else

  Begin c:=4;d:=5 end; if (x= =5)

  { a=1;b=2;}

else

  {c=3;d=5}

条件语句3 If x=5 then begin …end

Else if x=4 then begin …end

Else if x=3 then begin …end

Else if x=2 then begin …end

Else begin … end; if(x= =5){ ..}

else if (x= =4) { …}

else if (x= =3) { …}

else if (x= =2) { …}

else {…}

开关语句 Case ch of

‘a’,’b’: 语句1;

‘c’: 语句2;

‘d’,’e’,’f’: 语句3;

… …

  Else语句n;

End; Switch(ch)

{  case ‘a’:语句1;break;

  case ‘b’:语句2;语句3;break;

  case ‘c’:语句4;break;

  … …

  defale: 语句n;

}

循环语句1 For i:=1 to 10 do

  Begin  …  end;

For i:=10 down to 1 do

  Begin … end; for(i=1;i<=10;i++)

  { … }

for(i=10;i>=1;i--)

  { … }

循环语句2 While x>5 do

  Begin  …  end; while(x>5)

  { … }

循环语句3 Repeat

  …

Until x<0; do

{ … }

while(x>=0);

跳转 Break;

Continue;

Halt; Break; 提前结束循环

Continue;本次循环跳过

没有?

数组说明 Val  a:array[0..100] of longint;

    B:array[0..10,0..10] of integer; Long a[101];

Int a[11][11];

字符数组 Var a:array[0..10] of char; Char a[11];

文件读入写出 Assign(input,’aaa.in’);reset(inpu);

Assign(outout,’aaa.out’);rewrite(output);

Close(input);close(output); Freopen(“aaa.in”,”r”,stdin);

Freopen(“aaa.out”,”w”,stdout);

相关文章

  • 宝蓝与微软的爱恨情仇

    Borland的诞生和发展 --Borland传奇[https://blog.csdn.net/simonhehe...

  • 电与磁的爱恨情仇 变成了一座桥 连接着 你的爱恨情仇

  • 2020-08-19

    你的爱恨情仇都是你脑子里对这个人印象的爱恨情仇

  • 2018-03-27

    爱恨情仇

  • 两端

    爱恨情仇

  • 2017-07-09

    爱恨情仇。

  • 我的6年爱恨情仇

    今天跟大家聊点简单的,说说我与基金的“爱恨情仇” 说起我和基金的爱恨情仇,这可太多了! 它给了我赚钱的快乐,亏钱的...

  • 与父母的爱恨情仇

    多年以来,爸爸妈妈爱我,常常以他们的方式。很多情况下,那些方式不是我喜欢的。 高中时,他们干预我学业的选择。懵懂无...

  • 与父母的爱恨情仇……

    很想问大家一个问题,在你的眼中,你的父母是什么样的人?她们的关系是什么样的? 我出生于90年,苏中的一个小村庄。从...

  • 与英语的爱恨情仇

    我觉得在开始之前还是做个简单的自我介绍吧~大家好,我是一名来自新加坡的高中生,英语和中文程度都还算不错吧,毕竟从小...

网友评论

      本文标题:宝蓝与微软的爱恨情仇

      本文链接:https://www.haomeiwen.com/subject/tsdbcrtx.html