MACSCRPT Archives

May 2003

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Malcolm Fitzgerald <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 22 May 2003 10:02:52 +1000
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
>The first and second DISPLAY DIALOGs perform as expected, the first
>displaying the very first line of text and includes the RETURN character,
>the second displaying only a return character.  The third DISPLAY DIALOG,
>however, displays only a "20$" regardless of whether I am using READ
>BEFORE or READ UNTIL.

The read before and read until commands differ in this respect:

read before returns the string up to the delimiter
read until returns the string up to and including the delimiter

both set the current position in the file to the delimiter

-- fRef: ersatz file contents
abc$
def$ghi$


read fRef before return --> abc$ -- current position is file is after CR
read fRef before "$" --> def - current position in file is after $
read fRef until "$" --> ghi$ - current position in file is after $


>
>I really, really need that dollar sign in the data that precedes the "20."
>  Can anyone suggest a remedy?

set fMarker to "$"
set fldOne to read fRef until return
set fldTwo to read fRef before fMarker
set fldThree to fMarker & (read fRef before fMarker)




--
--
Malcolm Fitzgerald                        [log in to unmask]
Database Manager                          http://www.asauthors.org
The Australian Society of Authors         ph: 02 93180877 fax: 02 93180530

ATOM RSS1 RSS2