VS: VS: Time from the text field?
Klaus Major
klaus.major at metascape.org
Fri Aug 30 10:17:02 EDT 2002
Bonjour Yves,
>> just script this:
>>
>> ...
>> if offset(the system date, line -1 of fld "viestit") is 0 then put
>> empty into fld "viestit"
>> ...
>> This will just look for a match in the last line of that field.
>>
>> if (that is what you need) then
>> enjoy_and_be_happy
>> else
>> drop_another_line ## ;-)
>> end if
>
> Just a question :
> if you script :
>
> put system date into tdate
> put last line of fld "viestit" into tLastData
> put offset(tdate, tLastData) into tLine
> if tLine <> 0 then
> put empty into fld "viestit"
> end if
>
> It's just the same as you write but with more details.
> My question is : does it make a difference in the speed of the script
> ???
I am just lazy, so i write as short as possible ;-)
> this sample works on a little data, so the comparison of time
> consuming in this case will be difficult to test, but on a big file
> for example, would it be faster to write a script as you do or there
> would be any difference in time with my script ??
I don't think so, since the important part is the "offset".
That function first collects all necessary info (tDate and tLastdate)
and THEN
it will be executed. So execution-time only depends on the size of the
data.
> any idea ?
> --
> Greetings.
>
> Yves COPPE
Au revoir, mon ami...
Klaus Major
klaus.major at metascape.org
More information about the use-livecode
mailing list