mirror of
https://github.com/dschmenk/PLASMA.git
synced 2024-06-26 06:29:28 +00:00
Updated Hello World (markdown)
parent
cd907c9655
commit
3f8ec31717
|
@ -1,4 +1,3 @@
|
|||
# [hello.pla](https://github.com/dschmenk/PLASMA/blob/master/src/samplesrc/hello.pla)
|
||||
This is probably the simplest PLASMA program you can write:
|
||||
```
|
||||
include "inc/cmdsys.plh"
|
||||
|
@ -6,4 +5,6 @@ include "inc/cmdsys.plh"
|
|||
puts("Hello, world.\n")
|
||||
done
|
||||
```
|
||||
However, it is significant in that it demonstrates the basic layout of a PLASMA source file. Almost all PLASMA files will have `include "inc/cmdsys.plh"` at the beginning. All PLASMA files have to end with a `done` line. There could be more text afterwards, but it will be ignored by the compiler. Potentially a good place to put some documentation of the above code. And in the middle, we have a function call to put a string to the screen. The screen has an embedded carriage-return at the end, formatted like you would see in a C language style string, escaped with a `\` character.
|
||||
However, it is significant in that it demonstrates the basic layout of a PLASMA source file. Almost all PLASMA files will have `include "inc/cmdsys.plh"` at the beginning. All PLASMA files have to end with a `done` line. There could be more text afterwards, but it will be ignored by the compiler. Potentially a good place to put some documentation of the above code. And in the middle, we have a function call to put a string to the screen. The screen has an embedded carriage-return at the end, formatted like you would see in a C language style string, escaped with a `\` character.
|
||||
|
||||
# [hello.pla](https://github.com/dschmenk/PLASMA/blob/master/src/samplesrc/hello.pla)
|
||||
|
|
Loading…
Reference in New Issue
Block a user