I struggle with code sometimes in GCbasic, especially with some math & complex conditional sections.
Writing/pasting GCB code chunks in Excel VBA I can single step, watch variables, edit & debug output.
VBA & GCB are so similar that I need only to change minimally between the 2 .
Me being familiar with VB6 does help & there is plenty of online answers.
Structuring the VBA as much like CGbasic minimizes porting changes pasting back & it is surprising how little requires change. Of course there are subtle & significant difference like VBA rounds to nearest with long variables & need to use Array for Tables... (I could document them but where's the fun in that)
Validating just the conditional logic or math can be enough but I find pasting the whole subs to GCB & edit the difference works well.
Excel2007 is a useful part of my dev tool-chain & it seems to minimize the rapid apparent aging often associated with coding.
I've attached an xl spreadsheet that is setup with a button & VBA code window that will help if not so familiar with VBA (stupidly called macros). The spreadsheet is "macro-enabled" so will need to 'enable macros' to use.
There is an example Sub that I use the code in GCbasic, it should be helpful.
I struggle with code sometimes in GCbasic, especially with some math & complex conditional sections.
Writing/pasting GCB code chunks in Excel VBA I can single step, watch variables, edit & debug output.
VBA & GCB are so similar that I need only to change minimally between the 2 .
Me being familiar with VB6 does help & there is plenty of online answers.
Structuring the VBA as much like CGbasic minimizes porting changes pasting back & it is surprising how little requires change. Of course there are subtle & significant difference like VBA rounds to nearest with long variables & need to use Array for Tables... (I could document them but where's the fun in that)
Validating just the conditional logic or math can be enough but I find pasting the whole subs to GCB & edit the difference works well.
Excel2007 is a useful part of my dev tool-chain & it seems to minimize the rapid apparent aging often associated with coding.
I've attached an xl spreadsheet that is setup with a button & VBA code window that will help if not so familiar with VBA (stupidly called macros). The spreadsheet is "macro-enabled" so will need to 'enable macros' to use.
There is an example Sub that I use the code in GCbasic, it should be helpful.
ToniG - a very nice tool!
What a great way of simulation.