Stripping Linefeed Characters/h1>
Date:    Tue, 20 Jun 1995 11:26:37 +0000
From:    Mohammad Dastbaz <bs_s570@KINGSTON.AC.UK>
Subject: Loading Text Files
Good News!! Thanks to tips from Chas the problem with loading text files and getting "funny box characters" is over. Thanks to all who respondent and here is a version of the lingo that solves the problem. The script also re-adjust the tab character in the file and replaces them with " ".
on exitFrame
  global gReadObject
  set LINEFEED = numToChar(10)
  put FileIO(mNew, "read",  "d:\icons\doc2.txt") into gReadObject
  set aLine=gReadObject(mReadLine)
  repeat while aLine <> EMPTY
    if (char 1 of aLine) = LINEFEED then
      delete char 1 of aLine
    end if
    repeat while aLine contains TAB
      put "   " into char (offset(TAB, aLine)) of aLine
    end repeat
    put aLine after cast "t2"
    put cast "t2"
    set aLine = gReadObject(mReadLine)
    end repeat
    gReadObject(mDispose)
end