In Java, we print a "Hello, World!" to the console, something like this:
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
Create a program similar that prints "Hello, World!" to the console using Smart Pascal.
Pas2JS pascal source code
{ filename: D.pas}
unit D;
interface
uses
SmartCL.System;
type
ConsoleApp = class
public
class method Main(args: array of String);
end;
implementation
{ ConsoleApp }
class method ConsoleApp.Main(args: array of String);
begin
// add your own code here
WriteLn('Hello World.');
end;
end.
{ filename: main.pas }
ConsoleApp.Main([]); // Hello World.