开发者

How to create a simple pascal-program in Codegear RAD Studio 2009?

For example, this simple program:

Program Helloworld;
Begin
  开发者_JAVA技巧writeln ('Hello world!');
  readln;
End;


  1. Select "File|New|Other..." - the "New Items" Dialog appears

  2. Select "Delphi Projects" on the left panel

  3. Select "Console Application" on the right panel

  4. Click "OK" button.

That is all.


You can get rid of all the forms that a new project creates, and just have a program in the project file.

This looks like a console app so you'll want to do some steps. This is taken from the excellent delphi.about.com:

  1. Select "File | New Application"
  2. Select "Project | Remove From Project..."
  3. Select Unit1 (Form1) and click OK. Delphi will remove the selected unit from the uses clause of the current project.
  4. Select "Project | View Source"
  5. Edit your project source file: • Delete all the code inside "begin" and "end". • After the uses keyword, replace the "Forms" unit with "SysUtils". • Place {$APPTYPE CONSOLE} right under the "program" statement.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜