C function in metaTalk?

Wouter Abraham wouter.abraham at pi.be
Fri Mar 14 18:13:01 EST 2003


> C function in metaTalk?
>
>     * From: eric . allen . engle
>     * Subject: C function in metaTalk?
> * Date: Thu, 13 Mar 2003 05:09:52 -0800
>
> I'm trying to translate the following C functions into
> hypertalk.
> If done properly they take as input a string, say ABC
> and then
> permutate it into
> a
> a b
> a b c
> b
> b c
> c
>
> UGLY C***************************************

Hi again Eric,

Or this one if you like less lines :

local theResult

on mouseUp
  put abracadabra(fld "orig") into fld "result"
end mouseUp

function abracadabra x
   if x <> "" then
    repeat with i = 1 to the length of x
       put char 1 to i of x & cr after r
     end repeat
     put  r after theResult
     get abracadabra(char 2 to -1 of x)
   else return char 1 to -2 of theResult
end abracadabra


Have a nice night now,
WA




More information about the metacard mailing list