首页 > 学院 > 开发设计 > 正文

从零开始学习Ada(尝试)

2019-11-08 18:53:03
字体:
来源:转载
供稿:网友
with text_io;use text_io;PRocedure helloworld is task Foo; task body Foo is begin Put("In foo"); New_Line; end Foo;begin Put("Hello World"); New_Line;end helloworld;

Ada有一个特性叫Concurrency,并行执行task,先后顺序未定。所以对于上面的procedure,可能会出现两种结果:

In fooHello WorldIn fooHello World

Put相当于coutNew_Line就是开新的一行
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表