I realise that passing a parameter 'As Const' doesn't exist, and ByRefConst passes the whole array, where ideally I would only like to pass the index of a single element within the constant array, or ideally the constant itself.
I could pass the constant Byval of course, and this works perfectly, however RAM copies are produced, and as I am using this type of call a great deal, I could probably save some RAM as I am getting close to the limit with still more code to write!
I use As TABLEPTR for passing string constants elsewhere which saves me bucketloads of RAM (thanks again Jerry), is there anything similar I can do?
I am attempting to run the project in parallel, using Firewing (a beta 8 bit version interfaced to the Swordfish compiler), as there is support for Enums (thanks David!), and although it works well, I am attempting to defer my decision to make the transition to Firewing at present as there are other factors I have to consider. Perhaps I should just take a 'brave pill' ? !
Any suggestions would be gratefully appreciated.
Code: Select all
Const MYCONST_A = 0
Const MYCONST_B = 1
Const MYCONST_C = 2
' I know 'As Const' doesn't exist!
MyFunction(MYCONST As Const, ByRef MyByte As Byte) As Byte
'Do something here...
End Function