Announcement

Collapse
No announcement yet.

TRIM$, ANY - "feature"..

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

  • Borje Hagsten
    replied
    Machine is ok. Better to do a Ctrl+Alt+Del on my brain instead..

    Never been good at keeing the crayon inside the lines. Like to be
    flexibel, which is one of the reasons I love the PB compiler so much.
    It adds a dimension of "artistic" freedom I have never encountered in
    any other language/compiler. DDT, SDK, resource file dialogs, inline
    ASM - even third-party visual designers like EZGUI, etc? Anything goes.
    With PB, we are allowed to rule over our code.

    Love it, even if it means my poor old mind sometimes gets confused by
    all the neat ways to do things in PB and I start doing stupid mistakes
    like this one..


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

    Leave a comment:


  • ian mcallister
    replied
    Error:
    User Error
    Please replace user and press Ctrl Alt Delete to reboot your machine.





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

    Leave a comment:


  • Michael Mattias
    replied
    Somehow I don't think this is about paintbrushes and artists.

    It's more like keeping one's crayon inside the lines.

    MCM
    (No, Borje, you're not going to live this one down any time soon).


    Leave a comment:


  • Borje Hagsten
    replied
    Scary thought. If the compiler could read what's left of my mind at 3 o'clock in
    the morning, it would simply say "there's no hope" and commit GPF right away..


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

    Leave a comment:


  • Jim Padgett
    replied
    You'd think that by now with GHz processors and PowerBasic
    that the compiler would just read your mind and do what you
    want , not what you say...


    ------------------
    Jim Padgett
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Lance Edmonds
    replied
    That is a known issue.... it is called "faulty programmer"

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

    Leave a comment:


  • Borje Hagsten
    replied
    Forget it. TRIM$ is supposed to work that way, I see that now. Seems
    I managed to use REMOVE$ on my brain there..


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

    Leave a comment:


  • Borje Hagsten
    started a topic TRIM$, ANY - "feature"..

    TRIM$, ANY - "feature"..

    Discovered funny thing. TRIM$ trims away any character at end and start,
    but using ANY to remove characters inside a string, it only handles up to
    ASCII 127? Copy,paste and test following to see - result will be "Börje",
    without leading/ending "ö". Should be "Brje"..
    Code:
      LOCAL txt AS STRING
      txt = "öBörjeö"
      MSGBOX TRIM$(txt, ANY "ö")
    Found this "feature" when trying to trim away strange ASCII 160 from
    inside result in textbox with MS UpDown control attached to it. UpDown
    formats values above 999 by inserting CHR$(160) as thousand separator.

    Simple fix, use REMOVE$(txt, ANY "ö") instead - it works like expected..


    ------------------
Working...
X