Last active
December 29, 2015 02:19
-
-
Save fushnisoft/7599561 to your computer and use it in GitHub Desktop.
string ref test. Console output shows:
c:\Dev\Console\>Console.exe
thisString = hi there!
null
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PROGRAM | |
| Include('ConsoleSupport.inc'),ONCE | |
| Console ConsoleSupport | |
| MAP | |
| Main PROCEDURE() | |
| MyTest PROCEDURE(<*STRING pString>) | |
| END | |
| CODE | |
| Main() | |
| ! ---------------------------------------------------------------------------------- | |
| Main PROCEDURE() | |
| myString &STRING | |
| CODE | |
| IF Console.Init() | |
| Halt() | |
| END | |
| myString &= New(STRING(255)) | |
| myString = 'hi there!' | |
| MyTest(myString) | |
| MyTest() | |
| Dispose(myString) | |
| MyTest PROCEDURE(<*STRING pString>) | |
| thisString &STRING | |
| CODE | |
| thisString &= pString | |
| IF thisString &= NULL | |
| Console.WriteLine('null') | |
| ELSE | |
| Console.WriteLine('thisString = ' & thisString) | |
| END | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment