{"id":61,"date":"2007-04-05T05:27:22","date_gmt":"2007-04-05T10:27:22","guid":{"rendered":"http:\/\/www.amibroker.com\/kb\/2007\/04\/05\/new-keywords-in-afl-and-possible-conflict-with-user-defined-variables\/"},"modified":"2014-12-04T04:55:05","modified_gmt":"2014-12-04T09:55:05","slug":"new-keywords-in-afl-and-possible-conflict-with-user-defined-variables","status":"publish","type":"post","link":"https:\/\/www.amibroker.com\/wordpress\/kb\/2007\/04\/05\/new-keywords-in-afl-and-possible-conflict-with-user-defined-variables\/","title":{"rendered":"New keywords in AFL and possible conflict with user-defined variables"},"content":{"rendered":"

AmiBroker 4.91.0 BETA introduced the following new keywords:<\/p>

switch, case, break, continue, default<\/strong><\/p>

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.<\/p>

This article shows how to perform multiple-file text replace very quickly. <\/p>

To quickly update all your AFL files you can use this freeware tool:<\/p>

TextRep 2.0 from:<\/p>

http:\/\/www.no-nonsense-software.com\/cgi-bin\/redirect\/cgirdir.exe?texrep<\/a><\/p>

More info:
http:\/\/www.no-nonsense-software.com\/freeware<\/a>\/<\/p>

Instructions:<\/p>

1. Download from http:\/\/www.no-nonsense-software.com\/cgi-bin\/redirect\/cgirdir.exe?texrep<\/a>
and unzip<\/p>

2. Run setup program (from inside zipped folder) <\/p>

3. Run TextRep 2.0<\/strong> program<\/p>

4. Switch to “Scan folder(s)” page<\/p>

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<\/p>

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)<\/p>

Text Rep 2.0 screen <\/p>

7. Press Start to go on with replacing<\/p>

8. Repeat steps 6 and 7 with the following word pairs:
“case” -> “casevar”
“break” -> “breakvar”
“continue” -> “continuevar”
“default” -> “defaultvar”<\/p>

9. Run AmiBroker 4.91 and check if everything works fine. If so, you may delete .bak (backup) files created during replace process.<\/p>","protected":false},"excerpt":{"rendered":"

AmiBroker 4.91.0 BETA introduced the following new keywords:switch, case, break, continue, defaultYou 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 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[53,56],"_links":{"self":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/61"}],"collection":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/comments?post=61"}],"version-history":[{"count":1,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/61\/revisions"}],"predecessor-version":[{"id":830,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/61\/revisions\/830"}],"wp:attachment":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/media?parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/categories?post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/tags?post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}