Skip to content

Instantly share code, notes, and snippets.

@fushnisoft
Last active December 29, 2015 02:19
Show Gist options
  • Select an option

  • Save fushnisoft/7599561 to your computer and use it in GitHub Desktop.

Select an option

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
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