All messages should be posted in plain text. HTML will be converted to
attachments. The meditech-l web site is MTUsers.com
======================================
Brian:
What happens if you have a line of text greater than 255 chars? Haven't
tested but I suspect that you would crash your session. I use a similar
routine but I ensure that the input files always have line lengths
less than 255.
Les
________________________________________________
Leslie Mann
Clinical Application Specialist
Timmins and District Hospital
Voice: 705-267-2131 x2147
Fax: 705-267-6321
[EMAIL PROTECTED]
_________________________________________________
Hi Mitch,
How about the following:
@DELETE.TEXT.ARRAY,
[EMAIL PROTECTED]("C:\","*","")^FILE_.=.;
@Memory.allocate(1)^MEM,
@Memory.clear(MEM),
@Memory.beginning(MEM),
@Memory.load.file(MEM,FILE),
[EMAIL PROTECTED](MEM) @Memory.read.text(MEM)^TEXT,
IF{TEXT;" "}^/TEXT[-/TEXT[""]+1]},
@Memory.free(MEM)},
@CLEAN.UP
DELETE.TEXT.ARRAY
""^X,
DO{>/TEXT[X]^X ""^/TEXT[X]}
CLEAN.UP
""^FILE^MEM^TEXT
The only modifications are in the DO loop. I have added the use of the NPR
Macro called @Memory.more. It should return a non-nil value if there is
anything more to read in the Memory buffer (even blank lines). I have also
added an IF statement so that a blank space is assigned to the /TEXT array if
there is no value in the local variable called TEXT.
I have not had a chance to try this out, but I think it should work for you.
Please let me know if it doesn't.
Thanks,
Brian Schmit
_______________________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l