CR & LF importing

Ron rbarber at
Mon Jul 1 21:57:01 EDT 2002


I'm starting with 2 strikes against me: I come from another xtalk background
and I have been Mac only so please keep me from striking out.

I am trying to read in a custom prop to a list fld. The data is of the form:


it is stored in a custom prop that is part of a custpropset ('names') in the
mainstack ('startwd'). I am trying to read it in to a fld in a substack.
The script that reads it in is:

  put the names of stack "startwd" into thelist
  split thelist by return and comma
  put thelist[part1] into thetext
  replace "*" with return in thetext
  put thetext into fld "otbook"

The result is a single line of text with a lf symbol? in place of the '*'.
However, if the same script is put in another mainstack and read into a list
fld of the same attributes as the list fld in the original mainstack, the
items are correctly separated and display in the fld one per line.

I've tried to get rid of the lf symbol but can't paste it anywhere to get
it. I've tried various combinations of numtochar(10) and (13) and still
haven't been successful.

The entry for return in the dictionary states:
> The return constant is a synonym for linefeed. This is different from some
> other languages, in which return is equivalent to the carriage return
> character (ASCII 13, Control-M). For most purposes, Revoluton translates the
> linefeed constant and its synonyms into the appropriate end-of-line character
> for the current operating system. However, you should keep this nuance in mind
> when processing data from another system, which Revolution has not translated:
> return is not ASCII 13.

So, I was expecting Rev to handle this but it does not act the way I expect.
Can someone help me adjust my thinkng and get the line of items to display
one per line in a list fld of the original mainstack?


BTW this is on OS 9

More information about the Use-livecode mailing list