Stripping Returns
JB
sundown at pacifier.com
Wed Nov 19 14:53:09 EST 2014
Thank you for the reply and info.
I was wondering about limits in variables
and and the info everyone provided helps
me a lot.
John Balgenorth
On Nov 19, 2014, at 11:46 AM, Jerry Jensen <jhj at jhj.com> wrote:
> A couple more points:
> The space ending the "1234567890 " does wrap the line, but does NOT affect the limit.
> I tried putting the field back into a variable, and it is still 65533 length. The data is truncated.
>
> JB note: The limit is only in FIELDS, NOT VARIABLES. You can read a long file into a variable in one go with no problem. Its only when you put it into a field that the limitation applies.
>
> Jerry
>
> On Nov 19, 2014, at 8:54 AM, DunbarX at aol.com wrote:
>
>> Jacque.
>>
>> The text is truncated, not simply not displayed:
>>
>> on mouseUp
>> put "1234567890 " into temp
>> repeat 10000
>> put temp after accum
>> end repeat
>> put accum into fld 1 -- 110,000 chars
>> answer the length of fld 1
>> end mouseUp
>>
>> You get 65,533.
>>
>> Not sure where the last two chars went.
>>
>> Craig
>>
>>
>> -----Original Message-----
>> From: J. Landman Gay <jacque at hyperactivesw.com>
>> To: How to use LiveCode <use-livecode at lists.runrev.com>
>> Sent: Wed, Nov 19, 2014 11:15 am
>> Subject: Re: Stripping Returns
>>
>>
>> Reading a file always gives you all the content regardless of the size, up to
>> memory limits. Displaying a long line of text will truncate it after 62k but as
>> I understand it, the truncation is visual only. If a script asks for the line
>> it is all returned. (Better check that, but that was my understanding.)
>>
>> But the restriction only applies to lines that don't wrap, such as those in list
>> fields. If the text contains spaces or other delimiting tokens, the text will
>> wrap and the restriction is lifted.
>>
>> When reading a file from disk as text, line endings will be converted to the
>> ones used by the current OS. Text read as binary will not be altered.
>>
>>
>> On November 19, 2014 4:44:53 AM CST, JB <sundown at pacifier.com> wrote:
>>> Thank you. The logic is simple enough.
>>> Even so it should be noted in the read
>>> file that reading to the end of a file will
>>> fail to provide you the info if the file has
>>> more than 65,535 characters.
>>>
>>> John Balgenorth
>>>
>>>
>>> On Nov 18, 2014, at 8:35 PM, dunbarx at aol.com wrote:
>>>
>>>> Hi.
>>>>
>>>>
>>>> Did you try this? Simple to do in a little test card. The chars
>>> beyond 65535 will be lost. Do you see what the likely answer to your
>>> second question is? Note that reading from a file does not anticipate
>>> what you will do with the data. Variables have no limits, within
>>> memory, of course, but what you do with that data may hit a wall.
>>>>
>>>>
>>>> Craig Newman
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: JB <sundown at pacifier.com>
>>>> To: How to use LiveCode <use-livecode at lists.runrev.com>
>>>> Sent: Tue, Nov 18, 2014 9:48 pm
>>>> Subject: Stripping Returns
>>>>
>>>>
>>>> A field has a limit on the amount of characters
>>>> you can have on each line. What if I put the
>>>> text of a field in a variable and it has 500,000
>>>> characters. Then I strip all of the returns that
>>>> are in the field. Does that leave only one line
>>>> with 500,000 characters? That exceeds the
>>>> amount of characters allowed per line so what
>>>> happens to the text in the variable?
>>>>
>>>> Another similar question is what happens if I am
>>>> reading a file until the end and it is very large. Will
>>>> returns be automatically placed if needed so the line
>>>> limit got characters is not exceeded or do I need to
>>>> read large files in sections that are less than the line
>>>> limit for characters?
>>>>
>>>> John Balgenorth
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription
>>>> preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>> --
>> Jacqueline Landman Gay | jacque at hyperactivesw.com
>> HyperActive Software | http://www.hyperactivesw.com
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list