Write and run a program
Save this program as hello.hy:
public class Program { public static int Main(string[] args) { string name = "World"; if (args.Length > 0) { name = args[0]; } System.Console.WriteLine("Hello, " + name); return 0; }}hy compile hello.hy -o hellochmod +x hello./hello HydrogenFor repeat runs, execute ./hello directly. The release compiler produces native
executables; it does not have an interpreted run command.
Entry point and arguments
Section titled “Entry point and arguments”Main must be a static class method returning int or void. It accepts no
parameters or one string[] parameter. Arguments exclude the executable name;
an integer result becomes the process exit status.
Array access is checked, so test args.Length before indexing. UEFI output is
different: an EFI application is booted by firmware, not run from Linux.