-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test code examples in docs and add docs for per-file settings
Signed-off-by: Nick Cameron <[email protected]>
- Loading branch information
Showing
8 changed files
with
161 additions
and
42 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
File renamed without changes.
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,30 @@ | ||
--- | ||
title: "KCL settings" | ||
excerpt: "Documentation of settings for the KCL language and Zoo Modeling App." | ||
layout: manual | ||
--- | ||
|
||
# Per-file settings | ||
|
||
Settings which affect a single file are configured using the settings attribute. | ||
This must be at the top of the KCL file (comments before the attribute are permitted). | ||
E.g., | ||
|
||
``` | ||
// The settings attribute. | ||
@settings(defaultLengthUnit = in) | ||
// The rest of your KCL code goes below... | ||
x = 42 // Represents 42 inches. | ||
``` | ||
|
||
The settings attribute may contain multiple properties separated by commas. | ||
Valid properties are: | ||
|
||
- `defaultLengthUnit`: the default length unit to use for numbers declared in this file. | ||
- Accepted values: `mm`, `cm`, `m`, `in` (inches), `ft` (feet), `yd` (yards). | ||
- `defaultAngleUnit`: the default angle unit to use for numbers declared in this file. | ||
- Accepted values: `deg` (degrees), `rad` (radians). | ||
|
||
These settings override any project-wide settings (configured in project.toml or via the UI). |
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