Jump to content

Start from a main routine: Difference between revisions

Add Racket example
(omit D)
(Add Racket example)
Line 77:
=={{header|PureBasic}}==
PureBasic is procedural and any code which is not part of a procedure is considered 'main' code. This code also does not use any explicit syntax (i.e. a 'main' module) to cause it to execute and it always executes first.
 
=={{header|Racket}}==
 
Racket can be configured to run a REPL, run a main function, or just run top-level expressions. A main function can be run by executing <tt>racket -tm program.rkt</tt>.
 
<lang lisp>
#lang racket
(provide main)
(define (main)
(displayln "Hello World!"))
</lang>
 
=={{header|REXX}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.