April 5, 2007
AmiBroker 4.91.0 BETA introduced the following new keywords:
switch, case, break, continue, default
You have to make sure that your formulas do not use them as variable names. The above words are now reserved AFL keywords and if you use them for your own variables you need to replace this identifiers with names that do not conflict with the reserved keywords.
This article shows how to perform multiple-file text replace very quickly.
To quickly update all your AFL files you can use this freeware tool:
TextRep 2.0 from:
1. Download from http://www.no-nonsense-software.com/cgi-bin/redirect/cgirdir.exe?texrep
2. Run setup program (from inside zipped folder)
3. Run TextRep 2.0 program
4. Switch to “Scan folder(s)” page
5. Enter AmiBroker Formulas folder (by default it is C:\Program Files\AmiBroker\Formulas),
mark “Include subfolders” and enter *.afl into “File types” as shown in the picture
6. Enter “switch” in the “Text to find” box and “switchvar” in the “Replace with” field.
“Case sensitive” should remain UNchecked. (Texts should be entered without quotation marks)
7. Press Start to go on with replacing
8. Repeat steps 6 and 7 with the following word pairs:
“case” -> “casevar”
“break” -> “breakvar”
“continue” -> “continuevar”
“default” -> “defaultvar”
9. Run AmiBroker 4.91 and check if everything works fine. If so, you may delete .bak (backup) files created during replace process.