-
Notifications
You must be signed in to change notification settings - Fork 4
helloworld
If you're booting from an .iso image long file names get trimmed and this application might be called "hellowor" instead.
Shows a variant of the traditional first program's output.
This application accepts command-line parameters:
FS0:\> helloworld -help
Greetings, non-spherical habitation rock!
[general options trimmed]
Group 1:
-bool boolean parameter
-dbl <decimal> double parameter [default: 0.66]
Group 2:
-int <integer> integer parameter [default: 2]
The output includes the effective values for these parameters: if they aren't supplied in the command line their
defaults are used, for example passing a value to the -dbl
parameter overrides the parameter's default value:
FS0:\> helloworld -dbl 12412
Greetings, non-spherical habitation rock!
There's a -help parameter that'll show command line options!
effective argument values after defaults:
-bool: 0
-dbl: 12412.00
-int: 2
The "helloworld" application shows how to use command-line arguments: each argument is an array entry with type,
optional validator, name and description. An array of command-line arguments gets wrapped in a group, the group gets an
optional name and groups are passed to init()
.
The -help
and logging parameters are built-in, each application automatically includes them.
Sources are in apps/helloworld.c.