Skip to content

Commit 5d47e61

Browse files
committed
PIE update
1 parent 98f2e36 commit 5d47e61

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pie/pie/5 Plugins/Export and import.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ The code to specify a list of exports looks like this:
1919
}
2020
}
2121
```
22-
It may seem odd to label the array `imports[]` but that's exactly what they will be when received by the child script Here we're specify what they are in the parent's space. It's simply a matter of listing the variable names. Here's an example:
22+
It may seem odd to label the array `imports[]` but that's exactly what they will be when received by the child script Here we specify what they are in the parent's space; simply a matter of listing the variable names. For example:
2323
```
2424
run Calculator with Opcode and Arg1 and Arg2
2525
```
2626
On the receiving side, the child script would start with something like this:
2727
```
2828
import variable Opcode and variable Arg1 and variable Arg2
2929
```
30-
The first thing to say is that the names of the variable don't have to match what they were called in the parent script, but ther types must match, as must the number of shared variables. Here's the code to handle importing:
30+
The first thing to say is that the names of the variable don't have to match what they were called in the parent script, but their types must match, as must the number of shared variables. Here's the code to handle importing:
3131
```
3232
Import: {
3333

pie/pie/5 Plugins/content.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ The `box` command is a variable declaration and is implemented in a standard way
218218

219219
The `create` command accepts the syntax shown in the example at the top of this section, where the item is first named and then followed by a set of attributes, which can be given in any order. The function returns an object with all these items.
220220

221-
At runtime, the command is read from the program array and the various items are extracted. An object is built to contain the current values of the items and is written to the variable.
221+
At runtime, the command is read from the program array and the various items are extracted. An object is built to contain the current values of the 3 properties and is written to the variable.
222222

223223
Next we have the value handler object. This contains the compiler function `compile(compiler)` and the runtime function `get(program, value)`. Between them they provide the means to access any of the properties of the box variable, plus the volume, which is computed on the fly at runtime.
224224

0 commit comments

Comments
 (0)