I was working on a large project in VBP and I realised that it was getting out of control, unmanageable and needed split up into smaller modules.
I now have my code split up into smaller more manageable units (Setup.dba, Loader.dba, Main.dba etc...) with Main.dba being the entry point. I've used the #include to link the other files on a first level basis from the Main.dba. I now intend using the #include in the lower level files (Setup.dba, Loader.dba) to link to other smaller function files. This can lead to multiple includes of the same file into a project, I know that C++ uses the (#ifndef, #define, #endif) commands to block multiple declarations.
Q1. is there support for these commands (or similar) in DBP ?
Q2. is there a way of passing a variable
BYREF into a function? (see bellow)
#constant Max = 15
MyVal = 20
Limit(MyVal)
Print MyVal
Wait Key
End
Function Limit(*val)
if val>Max then val=Max
EndFunction
the above code should print 10,
the above code is very simple, I don't want to return a value
EndFunction rVal as the function will be adjusting several non global variables.
adding the
* didn't work...
Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.