You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/spin.md
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -524,6 +524,19 @@ PUB doprint22
524
524
print(@aFullDuplexSerialObj, 22)
525
525
```
526
526
527
+
### Object structures
528
+
529
+
The Spin2 syntax for declaring structures in the `CON` section is accepted
530
+
by flexspin, even for Spin1 files. For example:
531
+
```
532
+
CON sLine( long x, long y )
533
+
```
534
+
Flexspin also extends this to allow objects to be used as structures:
535
+
```
536
+
CON sLine("foo.spin2")
537
+
```
538
+
creates an abstract object named `sLine` which has the same methods and members as the object `foo.spin2`.
539
+
527
540
### PUB FILE and PRI FILE
528
541
529
542
A `pub` or `pri` function declaration may include a `file` directive which gives the file which contains the actual definition of the function. This looks like:
0 commit comments