Announcement

Collapse
No announcement yet.

Wishlist Item

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wishlist Item

    any thought to adding regular expressions to powerbasic?
    as in, the standard regular expressions with standard
    metacharacters (like from grep, but preferably egrep).

    such as:

    . matches any character[list] matches any character in list
    [0-9] matches any character in range
    [^list] matches any character _NOT_ in list
    ^ matches beginning of line (or string)
    $ matches end of line (or string)

    to name just a few. and the repetition operators as
    well:

    ? matches 0 or 1 of the preceding regex
    * matches 0 or more of the preceding regex
    + matches 1 or more of the preceding regex
    {n} matches n of the preceding regex

    and so on.

    that would be great. thanks!

    ------------------

  • #2
    RTFM

    Look for REGEXPR

    ------------------
    Every day I try to learn one thing new,
    but new things to learn are increasing exponentially.
    At this rate I’m becoming an idiot faster and faster !!!
    ------------------
    George W. Bleck
    Lead Computer Systems Engineer
    KeySpan Corporation
    My Email
    <b>George W. Bleck</b>
    <img src='http://www.blecktech.com/myemail.gif'>

    Comment


    • #3
      right. except we're in the "PowerBASIC for _DOS_" forum.

      ------------------

      Comment


      • #4
        Kim's wish has been expressed before.

        Many PB/DOS programmers retain and use an editor such as Brief to get features like regular expressions.

        If you don't object to coding outside the IDE, I think a web search might turn up several programming editors with roots to Unix features.

        For complex search and replace jobs outside the IDE, see http://www.funduc.com/

        ------------------
        Jim C.

        [This message has been edited by Jim Cody (edited October 11, 2003).]
        Jim C.

        Comment


        • #5
          while on wish list?
          if this is a place appropriate.

          never hurts to ask
          if not in powerbasic for dos maybe a another compiler.


          how about during the creation of exe's, chains, etc files.
          there can be a way to create a file listing of line numbers, lines with errors in the source code, and possibly
          assembly code(stretching it here) in a separate file for viewing.

          reason would be to better code or mostly important to find line numbers from the source
          code without having to recompile the program to find the problem,
          if a error code is displayed in the executing program.


          sorry if there is a way i did not see

          here is an example of a listing from a source bas file using cbasic

          ------------BASIC SOURCE CODE-----------------


          PRINT "HELLO"
          END


          -------------LISTING WITH ASSEMBLY CODE--------

          1: 0000h PRINT "HELLO"
          0000h MOV BX,1
          0003h CALL ?LNUM
          0006h MOV DX,0 DATA STMT RELATIVE
          0009h MOV BX,0 DATA STMT RELATIVE
          000ch CALL ?INIT
          000fh MOV BX,0 RCDATA SEG RELATIVE
          0012h CALL ?PCSN
          0015h CALL ?STOP
          2: 0018h END
          end of compilation
          no errors detected
          code area size: 24 0018h
          data area size: 10 000ah
          common area size: 0 0000h
          symbol table space remaining: 41160

          -------------LISTING WITH LINE NUMBERS


          1: 0000h PRINT "HELLO"
          2: 0018h END
          end of compilation
          no errors detected
          code area size: 24 0018h
          data area size: 10 000ah
          common area size: 0 0000h
          symbol table space remaining: 41160


          -------------LIST WITH ERRORS IN SOURCE CODE-------------

          -------------- SAME BASIC SOURCE CODE AS ABOVE WITH A ERROR ON THE PRINT LINE

          PRINT "HELLO
          END


          ----LISTING SHOWING THE ERROR WITH A CODE FOR THE ERROR IN THE LISTING FILE


          1: PRINT "HELLO
          *** error ^2
          2: END


          end of compilation
          1 errors detected
          symbol table space remaining: 41160



          ------------------
          p purvis

          Comment

          Working...
          X