10-26-2024, 10:31 PM
I updated mine and included a test file.
I'm old school, that's for sure. I do love the new QB64 features that cut out a lot of code but I'm just set in may ways about coding the routines from scratch. It's all I can do to stop myself from just writing the routine in machine code! j/k. Only did that headache once.
Steve, if you run my test code with your routine, you will see you need to add a few things...
Test file results after running Steve's routine...
---------------------------------------------------------------------------
Rem $Dynamic
Print " ' this should not be removed. Rem 123" rem this should be removed.
a$ = "apple":
b$ = "orange": Rem orange
c$ = "pear"
d$ = "banana" Rem banana
Rem line 3
Data don
Data "don't"
Data "don't":
Data "don't": Rem remark.
Data don
Data don
---------------------------------------------------------------------------
Test file results after running Pete's routine...
---------------------------------------------------------------------------
' $Dynamic
Rem $Dynamic
Print " ' this should not be removed. Rem 123"
a$ = "apple"
b$ = "orange"
c$ = "pear"
d$ = "banana"
Data don't
Data "don't"
Data "don't"
Data "don't"
Data don't ' remark is part of data and should stay.
Data don't rem remark is part of data and should stay, too.
----------------------------------------------------------------------------
The test file is posted in post #1, but I'll repost it here so it's easy to see
Test file --------------------------
' $Dynamic
Rem $Dynamic
' Simple rem line.
' "***": for i = 1 to 5
Print " ' this should not be removed. Rem 123" rem this should be removed.
a$ = "apple": ' apple
b$ = "orange": Rem orange
c$ = "pear" ' pear
d$ = "banana" Rem banana
' line 1
' line 2
Rem line 3
Data don't
Data "don't"
Data "don't": ' remark.
Data "don't": Rem remark.
Data don't ' remark is part of data and should stay.
Data don't rem remark is part of data and should stay, too.
---------------------------------------------------------------------------
The random indentations were made to make sure the routines can handle indenting.
If you guys find any errors in mine, let me know. There's a good chance I may have missed something. Actually Steve got ' $ for meta commands, and I added Rem $, which was also used back in the day. I love it that forums provide more hands on deck to make improving a project easier. Thanks guys,
Pete
I'm old school, that's for sure. I do love the new QB64 features that cut out a lot of code but I'm just set in may ways about coding the routines from scratch. It's all I can do to stop myself from just writing the routine in machine code! j/k. Only did that headache once.
Steve, if you run my test code with your routine, you will see you need to add a few things...
Test file results after running Steve's routine...
---------------------------------------------------------------------------
Rem $Dynamic
Print " ' this should not be removed. Rem 123" rem this should be removed.
a$ = "apple":
b$ = "orange": Rem orange
c$ = "pear"
d$ = "banana" Rem banana
Rem line 3
Data don
Data "don't"
Data "don't":
Data "don't": Rem remark.
Data don
Data don
---------------------------------------------------------------------------
Test file results after running Pete's routine...
---------------------------------------------------------------------------
' $Dynamic
Rem $Dynamic
Print " ' this should not be removed. Rem 123"
a$ = "apple"
b$ = "orange"
c$ = "pear"
d$ = "banana"
Data don't
Data "don't"
Data "don't"
Data "don't"
Data don't ' remark is part of data and should stay.
Data don't rem remark is part of data and should stay, too.
----------------------------------------------------------------------------
The test file is posted in post #1, but I'll repost it here so it's easy to see
Test file --------------------------
' $Dynamic
Rem $Dynamic
' Simple rem line.
' "***": for i = 1 to 5
Print " ' this should not be removed. Rem 123" rem this should be removed.
a$ = "apple": ' apple
b$ = "orange": Rem orange
c$ = "pear" ' pear
d$ = "banana" Rem banana
' line 1
' line 2
Rem line 3
Data don't
Data "don't"
Data "don't": ' remark.
Data "don't": Rem remark.
Data don't ' remark is part of data and should stay.
Data don't rem remark is part of data and should stay, too.
---------------------------------------------------------------------------
The random indentations were made to make sure the routines can handle indenting.
If you guys find any errors in mine, let me know. There's a good chance I may have missed something. Actually Steve got ' $ for meta commands, and I added Rem $, which was also used back in the day. I love it that forums provide more hands on deck to make improving a project easier. Thanks guys,
Pete

