Re: u" <string>"

From: Wong, Leo <LRW_at_mail3.cs.state.ny.us>
Date: Wed, 23 Jun 2004 14:23:20 -0400

-----Original Message-----
From: Rob Ward [mailto:rob.ward_at_tpg.com.au]
Sent: Wednesday, June 23, 2004 10:54 AM
To: sftalk_at_forth.com
Subject: [sftalk] u" <string>"

need to use unicode.

The command u" referenced in the switftforth.pdf (page 101) and handbook is
missing...

Please try:

\ Assume 1 chars = 1 address unit
: uallocate ( ca u -- a )
   2* 2 + DUP ALLOCATE THROW TUCK SWAP ERASE ;
: umove ( ca u s -- )
   SWAP 0 ?DO >R COUNT R@ C! R> 2 + LOOP 2DROP ;
: uliteral ( ca u -- )
   DUP uallocate >R R@ umove R> POSTPONE LITERAL ; IMMEDIATE
: u" ( <string>" -- addr ) \ Compile only
   [char] " PARSE POSTPONE uliteral ; IMMEDIATE

Leo Wong
http://www.albany.net/~hello/

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Wed Jun 23 2004 - 11:24:57 PDT


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 09-Feb-2012. Archive updated nightly.