-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more lolicode docs and reformatted old ones
- Loading branch information
1 parent
135f0fb
commit 0f4488b
Showing
11 changed files
with
178 additions
and
58 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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
sidebar_label: 'Usings' | ||
sidebar_position: 8 | ||
--- | ||
|
||
# Using statements | ||
Sometimes, you may want to use external libraries or namespaces in your LoliCode script. You can do this by adding `using` statements in the appropriate section. Using statements need to be defined one per line, with just the namespace name. | ||
|
||
For example, if you try to use the `Regex` class from the `System.Text.RegularExpressions` namespace: | ||
|
||
```loli | ||
string match = new Regex(@"^\d{4}").Match(input.DATA).ToString(); | ||
CLOG Magenta @match | ||
``` | ||
|
||
You will get an error message like this: | ||
|
||
``` | ||
[IDLE] CompilationErrorException: (3,20): error CS0246: The type or namespace name 'Regex' could not be found (are you missing a using directive or an assembly reference?) | ||
``` | ||
|
||
If instead you add the `using` statement, you will be able to use the `Regex` class successfully. | ||
|
||
![Using statements](/img/lolicode/usings.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.