TACHYON O/S V3.0 JUNO - Furiously Fast Forth, FAT32+LAN+VGA+RS485+OBEX ROMS+FP+LMM+++

1102103104105106108»

Comments

  • proplem wrote: »
    @Peter Jakacki,
    you commented out ERASE$ in (V3) EXTEND.FTH
    pub ERASE$ ( str -- \ Fully erase the string - reads max len from header )
            DUP 3 - C@ ERASE
            ;
    
    Is something wrong with it?

    Mainly because not all strings are created equal, that is, those strings that were constructed with the STRING function had an additional field specifying the maximum string length which ERASE$ could use but a common string is normally just a null terminated string without any special fields. Applying ERASE$ to these common null terminated strings would cause definite problems.

    But there is the problem with any general erase string function for who knows how long a string is or can be.

    btw, V4.3 is just about ready.

    useforthlogo-s.png
    LINKS
    Brisbane, Australia
  • Hi Peter,

    I know how the OK word can be used to turn off the prompt
    off OK
    

    Is there a way to suppress the "ok" and just have a CR returned?

    Thanks
  • MJBMJB Posts: 878
    edited April 26 Vote Up0Vote Down
    @D.P
    read the source ...
    \\\ original
    pub NOOP ;
    pub OK ( on/off -- )		IF 0 ELSE ' NOOP THEN prompt 2+ W! ; \ enable/disable OK prompts including the autospace )
    
    \\ so you can do:\
    pub MYPROMPT CR ;
    
    ' MYPROMPT  prompt 2+ W!   
    
    \\to get the original prompt back:
    prompt 2+ W~
    \\ or simply
    ON OK
    
    TESTED !! ;-)
    http://www.smmu.info (german) Source-Measure-Multiplex-Unit = professional test system for electronic components, sensors, assemblies
    Tachyon code and documentation snippets from Tachyon thread
Sign In or Register to comment.