Announcement

Collapse
No announcement yet.

REPLACE ANY

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

  • Lance Edmonds
    replied
    Scott, you must be tilting your head the wrong way when you are writing your code, or using the ANY keyword inappropriately...


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Scott Turchin
    replied
    I can't think of a single time I've ever used ANY in my code, and since i am never knowing exactly what the string will be, using ANY almost always generates a Dr Watson for me...
    I just never use it, never missed it either...

    ------------------
    Scott Turchin
    MCSE, MCP+I
    Computer Creations Software
    http://www.tngbbs.com/ccs

    Leave a comment:


  • Bernard Chapman
    replied
    Eric,

    When all else fails read the documentation. It was there all the time.

    Thanks for that.

    Regards,

    Bern

    ------------------
    Bern

    www.insighttrading.com.au

    Leave a comment:


  • Eric Pearson
    replied
    With REPLACE ANY the search and replace strings must be the same length. If they are not, errors will occur.

    Code:
    REPLACE ANY "ef" WITH "  " IN mystring
    -- Eric



    ------------------
    Perfect Sync Development Tools
    Perfect Sync Web Site
    Contact Us: mailto:[email protected][email protected]</A>

    Leave a comment:


  • Bernard Chapman
    started a topic REPLACE ANY

    REPLACE ANY

    Why does the message box show

    ef

    when the code below is run?

    Code:
    #COMPILE EXE
    
    FUNCTION PBMAIN() AS LONG
    LOCAL mystring AS STRING
    
    mystring="abcd"
    
    REPLACE ANY "ef" WITH " " IN mystring
    
    
    MSGBOX mystring
    
    END FUNCTION
    Regards,

    Bern


    ------------------
    Bern

    www.insighttrading.com.au
Working...
X
😀
🥰
🤢
😎
😡
👍
👎