Problem with readline

Alan Mazuti amazu at trusteeservicesinc.com
Tue Apr 7 09:57:25 PDT 2009


Specify a 3rd argument of 80 works and the lines that I am importing are not
longer than 80 characters.   Tried ln as uncast and that generated a syntax
error.

Thanks

Alan

-----Original Message-----
From: filepro-list-bounces+amazu=trusteeservicesinc.com at lists.celestial.com
[mailto:filepro-list-bounces+amazu=trusteeservicesinc.com at lists.celestial.co
m] On Behalf Of Fairlight
Sent: Tuesday, April 07, 2009 9:47 AM
To: 'filePro Mailing List'
Subject: Re: Problem with readline

Only Alan Mazuti would say something like:
> opendir commands succeeds and fn contains a valid filename and xa="1".  As
> soon as It hits the ab=readline(xa,ln) I get the segmentation error.
> 
> ::xa(8,#)                         'Array subscript':
> ::ln(80,*)                        'Text line':

You're casting "ln" as 80 long.  I suspect you're hitting a line longer
than 80.  It is documented that it should use the length of the field but
it sounds like a bounds checking bug was introduced.

Two potential workarounds depending on your goal:

1) Specify a 3rd argument, "80", for readline if you really only want the
first 80 characters.

2) Use "ln" uncast, and specify "32767" as the third argument to readline.
That will give you the full line to the NL, and resize the field.

This assumes the bug is only of medium severity.  These might not work if
it's really hosed badly.

mark->
-- 
"I'm not subtle. I'm not pretty, and I'll piss off a lot of people along
the way. But I'll get the job done" --Captain Matthew Gideon, "Crusade"
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
http://mailman.celestial.com/mailman/listinfo/filepro-list



More information about the Filepro-list mailing list