trunc

Kay C Lan lan.kc.macmail at gmail.com
Sun Feb 10 02:15:01 CST 2008


On Feb 10, 2008 10:03 AM, Richard Gaskin <ambassador at fourthworld.com> wrote:

>
> function logicalTrunc n
>   if n is not a number then return "NAN"
>   get offset(".", n)
>   if it > 0 then
>      delete char it to -1 of n
>   end if
>   return n
> end logicalTrunc
>
> or

function anotherLogicalTrunc n
  if n is not a number then return "NAN"
  set the itemDelimiter to "."
  return item 1 of n
end anotherLogicalTrunc



More information about the use-livecode mailing list