System.Keywords (gb.eval)
However, not sure how to use it. I guess I need to declare an array and write a loop, but all my attempts thus far have generated errors. Could someone kindly point me in the right direction?Thanks!
System.Keywords (gb.eval)
However, not sure how to use it. I guess I need to declare an array and write a loop, but all my attempts thus far have generated errors. Could someone kindly point me in the right direction?Public Sub Main()
Dim s As String
For Each s In System.Keywords
Print s
Next
End
OOP rocksMedian Joe wrote: ↑Friday 11th November 2022 1:15pm Thanks vuott,
I haven't quite got my head around how the Gambas object system works and was using the wrong syntax. I've always avoided OO languages until now and have only a hazy grasp of how OOP works, and all languages seem to implement it slightly differently.
Print System.Keywords.Sort().Join("\n")
System.Keywords returns a String[] array so i use Sort() on thatAll criticism of OOP (and there is a lot of it) seems to revolve around knowing when it's a appropriate to use it. It's a good fit for GUI, but maybe not other applications, like merging files or doing calculations for example. At least Gambas doesn't force OOP on you in all situations, as Java seems to.