Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove Remarks for Programs
#11
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
Reply


Messages In This Thread
Remove Remarks for Programs - by Pete - 10-26-2024, 02:01 AM
RE: Remline clone for QB64. - by ahenry3068 - 10-26-2024, 03:33 AM
RE: Remline clone for QB64. - by ahenry3068 - 10-26-2024, 03:51 AM
RE: Remline clone for QB64. - by Pete - 10-26-2024, 04:02 AM
RE: Remline clone for QB64. - by ahenry3068 - 10-26-2024, 07:25 AM
RE: Remove Remarks for Programs - by SMcNeill - 10-26-2024, 08:16 AM
RE: Remove Remarks for Programs - by PhilOfPerth - 10-26-2024, 09:50 AM
RE: Remove Remarks for Programs - by Dimster - 10-26-2024, 01:14 PM
RE: Remove Remarks for Programs - by Dimster - 10-26-2024, 02:01 PM
RE: Remove Remarks for Programs - by SMcNeill - 10-26-2024, 09:42 PM
RE: Remove Remarks for Programs - by Pete - 10-26-2024, 10:31 PM
RE: Remove Remarks for Programs - by SMcNeill - 10-26-2024, 10:47 PM
RE: Remove Remarks for Programs - by Pete - 10-26-2024, 11:03 PM
RE: Remove Remarks for Programs - by PhilOfPerth - 10-26-2024, 11:26 PM
RE: Remove Remarks for Programs - by Pete - 10-26-2024, 11:29 PM
RE: Remove Remarks for Programs - by Dimster - 10-27-2024, 12:49 PM
RE: Remove Remarks for Programs - by SMcNeill - 10-27-2024, 01:04 PM
RE: Remove Remarks for Programs - by Dimster - 10-27-2024, 02:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Limited Time Programs SMcNeill 10 2,152 02-09-2023, 02:25 AM
Last Post: TerryRitchie
  Remove Spaces (or other characters) from a String George McGinn 10 2,954 12-31-2022, 12:21 PM
Last Post: euklides

Forum Jump:


Users browsing this thread: 1 Guest(s)