Memory access violation on private Main
Monkey Forums/Monkey Bug Reports/Memory access violation on private Main
| ||
Private Function Main() Print "Test" End Influenced by Pythons __main__ I thought I would use it in utility files for tests where I don't want the main to be visible outside the unit. Something like
Public
Function Add(a,b)
Return a + b
End
Private
Function Test(text$,b?)
Print text
If b Then
Print "Test passed"
Else
Print "Test failed"
End
End
Function Main()
Test("1+2=3", 1+2=3)
End |