Command:
$ cat helloworld.hs
Result:
main = putStrLn "Hello, World!"
Command:
$ ghc helloworld.hs
Result:
[1 of 1] Compiling Main ( helloworld.hs, helloworld.o )
Linking helloworld ...
Command:
$ ./helloworld
Result:
Hello, World!
Showing posts with label "Hello World!" program. Show all posts
Showing posts with label "Hello World!" program. Show all posts
Monday, December 5, 2016
Monday, November 14, 2016
Ubuntu: Dialog: Installation and Hello World
Command:
$ sudo apt-get install dialog
Result:
[sudo] password for USERNAME:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
dialog
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 215 kB of archives.
After this operation, 1,138 kB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu yakkety/universe amd64 dialog amd64 1.3-20160424-1 [215 kB]
Fetched 215 kB in 0s (1,258 kB/s)
Selecting previously unselected package dialog.
(Reading database ... 88450 files and directories currently installed.)
Preparing to unpack .../dialog_1.3-20160424-1_amd64.deb ...
Unpacking dialog (1.3-20160424-1) ...
Setting up dialog (1.3-20160424-1) ...
Processing triggers for man-db (2.7.5-1) ...
Command:
$ dialog --title "Hello" --msgbox 'Hello World!' 6 20
Graphical output:
$ sudo apt-get install dialog
Result:
[sudo] password for USERNAME:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
dialog
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 215 kB of archives.
After this operation, 1,138 kB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu yakkety/universe amd64 dialog amd64 1.3-20160424-1 [215 kB]
Fetched 215 kB in 0s (1,258 kB/s)
Selecting previously unselected package dialog.
(Reading database ... 88450 files and directories currently installed.)
Preparing to unpack .../dialog_1.3-20160424-1_amd64.deb ...
Unpacking dialog (1.3-20160424-1) ...
Setting up dialog (1.3-20160424-1) ...
Processing triggers for man-db (2.7.5-1) ...
Command:
$ dialog --title "Hello" --msgbox 'Hello World!' 6 20
Graphical output:
Bash dialog Hello World! |
Saturday, October 29, 2016
macOS Sierra: SWI-Prolog: Hello, World!
Command:
$ cat helloworld.swi
Result:
main :-
write('Hello, World!\n').
Command:
$ swipl
Result:
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 7.2.3)
Copyright (c) 1990-2015 University of Amsterdam, VU Amsterdam
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
Command:
?- ['helloworld.swi'].
Result:
true.
Command:
?- main.
Result:
Hello, World!
true.
$ cat helloworld.swi
Result:
main :-
write('Hello, World!\n').
Command:
$ swipl
Result:
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 7.2.3)
Copyright (c) 1990-2015 University of Amsterdam, VU Amsterdam
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
Command:
?- ['helloworld.swi'].
Result:
true.
Command:
?- main.
Result:
Hello, World!
true.
Subscribe to:
Posts (Atom)