Minor changes and fixes

This commit is contained in:
Adsooi 2021-12-28 00:57:55 +01:00
parent 573d2da85e
commit 66bfe1d2c4
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
2 changed files with 10 additions and 2 deletions

View file

@ -19,7 +19,15 @@ This is the main script which will use our objects.
importNamespace Example.shn
Example.Object t "Test"
Example.Object t1 "Test"
Example.Object t2 "Example"
t1.print
t2.print
t1.name = "New name"
t1.print
```
`Example.shn`:

2
oop.sh
View file

@ -4,7 +4,7 @@
# Internal variables are marked with a beginning underscore, like in most other languages.
# Signatures are a list of arguments.. Those within <> are mandatory, the ones within [] are optional.
_namespace=""
_namespacePath=""
_namespacePath=$(realpath $(dirname ${BASH_SOURCE[0]}))
# Namespace declaration.
# Signature: ([string namespaceName])