The BASIC and PHP to LiveCode conversion features included with FmPro Migrator Platinum Edition help automate the conversion of PHP and BASIC code into the Rev development platform. Rev and the LiveCode language can be used to deploy applications to MacOS X, Windows and Linux desktops, as a Web browser plug-in revLet, the server and mobile devices (including the iPhone).

FmPro Migrator traverses all subdirectories of a selected top-level source directory and converts all of the PHP or BASIC files which it finds. The converted LiveCode code is either saved as an .irev file in the destination directory, or as a card script assigned to a card within a new Rev stack file. The high performance conversion process is able to process hundreds of files within a matter of seconds, saving many hours of boring and tedious manual labor.

The PHP to LiveCode conversion features include:
• PHP Variable Conversion - The $ character is removed from PHP variables and the variable name is checked to determine if it conflicts with an existing Rev keyword or function name. Conflicting variable names are changed by adding an underscore character to the end of the name.

• <?php tags are converted to <?rev tags - The <?rev tags will be usable within .irev files but will be removed if the code is being saved into a Rev stack. Code outside of <?php tags is assumed to be HTML code and it is either passed thru without changes within .irev files or it is commented out within Rev stack code.

• Trailing Semicolon And Curly Bracket Removal - Each complete PHP instruction is terminated with a semicolon which is removed during the conversion. Code blocks including conditionals and Try/Catch statements are bracketed with curly braces, which either get removed or replaced with the appropriate LiveCode instruction.

• Commonly Used Keyword Conversion - Keywords such as IF, ELSE, TRY/CATCH, REQUIRE, SPRINT, WHILE are converted into the equivalent LiveCode instruction.

• Commonly Used Function Conversion - Some built-in PHP functions including trim(), strlen(), printf(), strtolower() and strtoupper() have direct equivalents in LiveCode so these are converted accordingly.

• Custom Function Conversion - LiveCode functions don't use parenthesis surrounding the parameter list and don't need to have opening and closing curly brackets so these are removed. The closing curly bracket is replaced with the end keyword followed by the name of the function.

• Multi-line HERE Document Code - PHP scripts often include blocks of text/HTML containing variables which are evaluated and placed into a variable. The HERE document spans multiple lines and is converted into a single line LiveCode put statement.

• Code Indenting - Code indenting and comments are retained from the original code in order to improve the readability and maintainability of the converted code. However you can easily reformat the code by clicking the TAB key within the editor in the Rev IDE.

The BASIC to LiveCode conversion features include:
• Support for Multiple Versions of BASIC - BASIC syntax from a variety of development environments is supported, including (but not limited to) : Visual Basic, VBScript, VBA, PowerBasic, ZBASIC/FutureBasic and RealBasic.

• BASIC Variable Conversion - BASIC variables on the left side of an assignment operator or within a DIM statement are converted to LiveCode variables by removing trailing data type characters. Conflicting variable names are changed by adding an underscore character to the end of the name.

• <?rev Tags Added to .irev Files - If .irev files are selected as the output file type then <?rev and ?> tags are added to the file so that it will be executable by the On-Rev web server.

• Code Indenting - Code indenting and comments are retained from the original code in order to improve the readability and maintainability of the converted code.

Demo Mode and demo revLets - By default, FmPro Migrator Platinum Edition processes 5 scripts of unlimited length in demo mode without a license key. Also, each of the detailed info pages include a demo revLet which converts PHP or BASIC code to LiveCode within a web browser.