Part 3 compile file (page 8)

xiaoxiao2021-03-06  39

Part 3 compile file (page 8)

A simple console application The following programs are a simple console program that you can compile and run in the command line. Program greeting; {$ apptype console} var mymessage string; beginmyMessage: = 'Hello World!'; Writeln (mymessage); end. The first line of description is Greeting. {$ Apptype console} tells the compiler to be a console application running in the command line. One of the following lines define a variable called MyMessage string type. (Delphi has a real String data type), this program passes the string "Hello World!" To myMessage variable, then use the WriteLn command to output myMessage to the standard output device. (Writeln is defined in the System unit file, in many applications, the compiler automatically contains this file) Saves a file that is Greeting.Pas or Greeting.dpr, then enter the following command to compile DCC32 Greeting to generate one Win32's executable DCCIL Greeting generates a .NET executable. In addition to its simple, this example is different in many ways and your program written in the Borland development tool. First, it is a console application. The Borland development tool is often used to develop the application of the graphical interface, so you will not use the WriteLn command normally. In addition, all routines are in a separate document. In a typical graphics image interface program, the row of examples starting will be placed in a separate engineering file, which does not include any actual logic program, which is different from the minority in the unit file being called to the program definition.

转载请注明原文地址:https://www.9cbs.com/read-76970.html

New Post(0)