Start from a main routine: Difference between revisions
Content added Content deleted
(omit D) |
(Add Racket example) |
||
Line 77: | Line 77: | ||
=={{header|PureBasic}}== |
=={{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. |
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}}== |
=={{header|REXX}}== |