What would this be in Rev?

Brian Yennie briany at qldlearning.com
Sun Mar 8 19:04:04 EDT 2009


Bill,

Do you know what language this is from? It has C-style syntax and  
strcat is a fairly standard function, but I've never seen strindex()  
used like that with 3 parameters.
Do you know what the code is supposed to do? The variable names aren't  
very revealing, and it seems to be concatenating 3 variables and then  
turning around and extracting them back out.

Then, at the end, it's calculating a hash of two values (str and seed)  
which don't exist elsewhere in the code.

I think you'll need to know more about the context and purpose here to  
have a shot at translating it -- I doubt this snippet would compile in  
its original language on its own.

HTH,
Brian

> I have some code from another language that I want to run in Rev.  
> What is the Rev equivalent for these commands?
>
> baseKey = strcat(myVariable, strcat(myVariable2,myVariable3))
> myVariable = strindex(1,1 baseKey)
> myVariable2 = strindex(2,2, baseKey)
> myVariable3 = strindex(20,3, baseKey)
>
>
> caculatedMD5 = strstr(
>                               md5(
>                                       strcat(
>                                               lowercase(str),
>                                               lowercase(seed)))
>                               ,20)
>
>
>
> I don't know if there should be a comma after the second 1 in the  
> second example or not but that is the way I have it.
>
> Thanks,
> Bill Vlahos



More information about the use-livecode mailing list