Compile/Translate and run "greet" sample programs

 
Language
Compile/Translate
Execute
Machine
1. Fortran f90 greet.f -o greet greet CS1
2. Pascal pc greet.pas -o greet greet CS1
3. Ada gnatmake greet.adb 
(You need to add /opt/gnu/bin at the front of your path in order to use the Ada compiler, but it will disable the C++/C compiler; Remove it after you finished to restore the C++/C compiler:
"PATH=/opt/gnu/bin:${PATH}
 export PATH")
greet CS1 
4. ANSI C gcc greet.c -o greet greet CS1
5. C++ g++ greet.cpp -o greet greet CS1
6. Java Application javac greeting.java java greeting CS1, PC
7. Html & Java Applet Javac greetingApplet.java Use Netscape or

Explorer or

Appletviewer to view the greetApplet.html 

CS1, PC
8. Html & JavaScript Create the greetJavaScript.html Use Netscape to view the

greetJavaScript.html 

CS1, PC
9.Html Form & Perl Create and Save the greet.pl at cgi-bin directory;

Create the greetForm.html

Use Netscape or Explorer or appletviewer to view the greetForm.html CS1, jliusun, 

PC

10. Modula-3 m3build 

(Create src/Main.m3 and src/m3makefile first)

SOLgnu/greet CS1
11. Smalltalk gst

or

Smalltalk: must run in the X-window, such as Sun openwin

st> CS1
12. Lisp lisp

(load "greet.lsp")

(greet) 

-name of the function

CS1
13. Prolog xsb consult('greet.prl'). CS1
14. Icon icont greet.icn greet  CS1
15. tcl   tclsh greet.tcl CS1
16. tk   wish -f greet.tk CS1
17-1. Bourne Shell   sh greet.sh CS1
17-2. Korn Shell   ksh greet.ksh CS1
17-3. C Shell   csh greet.csh CS1
17-4 bcsh   bcsh greet.bcsh CS1
18. SQL sqlplus userId/PassWd SQL>@greet.sql CS1
19. Cobol ccbl greet.cbl 

(export PATH=$PATH:/appl/AcuCobol)

runcbl lydia
20-1. Quick Basic   qbasic

(load greet.bas)

PC DOS
20-2. Visual Basic   Click VisualBasic icon PC Windows
21. Algol (No compiler is available) greet.algol  
22. Snobol (No compiler is available) greet.snobol4  
23. PL/I (No compiler is available) greet.pl1