-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e99dc88
commit 99e5ef8
Showing
1 changed file
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,37 @@ | ||
__bcc__ is an ACS/ACS95/BCS compiler. | ||
<kbd>bcc</kbd> is a BCS, ACS, and ACS95 compiler. | ||
|
||
BCS is mostly compatible with ACS and provides many extra features, including the following: | ||
## Supported Scripting Languages | ||
|
||
<kbd>bcc</kbd> can compile source code written in the following languages. | ||
|
||
### BCS | ||
|
||
``` | ||
strict namespace SampleCode { | ||
script "Main" open { | ||
static str basket[] = { "apples", "oranges", "pears" }; | ||
foreach ( auto fruit; basket ) { | ||
Print( s: "I love ", s: fruit, s: ( fruit == "oranges" ) ? | ||
" very much" : "" ); | ||
} | ||
} | ||
} | ||
``` | ||
|
||
BCS is an extension of ACS. BCS is mostly compatible with ACS and provides many interesting and useful features, including the following: | ||
|
||
* Structures | ||
* Enumerations | ||
* Namespaces | ||
* Preprocessor | ||
* Strong types | ||
* References (limited support) | ||
* Block scoping | ||
* Optional function parameters | ||
* Logical-AND (`&&`) and Logical-OR (`||`) are short-circuited | ||
* `&&` and `||` operators are short-circuited | ||
* `foreach` loop | ||
* Nested functions | ||
* `?:` operator | ||
|
||
See the [details](https://github.com/wormt/bcc/blob/bcs/doc/details.md) file for an overview of the features. | ||
|
||
### ACS/ACS95 | ||
<kbd>bcc</kbd> can also compile ACS and ACS95 code. ACS95 is the ACS scripting language that was used for scripting Hexen. The name, ACS95, is invented by <kbd>bcc</kbd> to distinguish between the two languages. |