Code translation anyone ?

Bob Sneidar bobsneidar at iotecdigital.com
Fri Mar 15 11:15:19 EDT 2024


I tried to write a code converter from dBase (Foxpro) to what is now called Livecode. I ran into at least one insurmountable issue. I forget exactly what it was, but it was along the lines of certain conventions used in Foxpro that had no parallel in Livecode or meant something totally different in Livecode. For instance, Foxpro uses a convention called Macro Substitution, where preceding a variable with an ampersand would at runtime replace the variable with its contents. For instance: 

x = "Fox"
? "&x.Pro”

Would produce FoxPro. The trouble was that ampersand is *ALSO* used for concatenation! How can I tell? Periods inside quotes are just periods *unless* they are used in Macro Substitution. 

There were a couple others, like using $ for certain things. I came to the conclusion that the process would be more complex than I wanted, if at all possible, and in the end it would be easier to simple reproduce the application from scratch. 


Bob S



> On Mar 15, 2024, at 7:39 AM, jbv via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> One detail I forgot in my question : code translation using
> ChatGPT or any other AI.
> 
> Thanks,
> jbv
> 
> 
> Le 2024-03-15 10:36, jbv via use-livecode a écrit :
>> Hi list,
>> Has anyone tried to translate code from 1 version to
>> another, or from 1 language to another ?
>> Like from php 5 to php 8, or from php to LC ?
>> My question concerns mainly server scripts.
>> Thanks,
>> jbv
>> _______________________________________________
>> 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