Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'list' method type #25

Open
chros73 opened this issue Oct 1, 2018 · 0 comments
Open

Fix 'list' method type #25

chros73 opened this issue Oct 1, 2018 · 0 comments
Labels

Comments

@chros73
Copy link
Owner

chros73 commented Oct 1, 2018

Fix 'list' method type: although there was an attempt to deal with 'list' types but it never worked (at least since v0.9.0).
Now we can create/redefine arrays, even dynamically as well.

Similarly to method.insert.value method, add the following methods that create public, mutable properties:

  • method.insert.bool
  • method.insert.string
  • method.insert.list

Examples:

# Defining properties
method.insert = foo1, list, {"x1", "x2", "x3"}
method.insert = foo2, list|private, {10, 20, 30}
method.insert = bar1, list|const,
method.insert = bar2, list
method.insert.list = foo3, {"z1", "z2", "z3"}

# Accessing second element of an array
print=(array.at, (foo1), (value,1))
# Redefine array
foo1.set={1, 2}
# Calculation
print=(math.add, (foo1))
# Size of an array
print=(array.size, (foo1))
# Redefine array dynamically
foo1.set="$d.multicall2=active, cat=$d.state="
@chros73 chros73 added the bug label Oct 1, 2018
chros73 pushed a commit that referenced this issue Oct 1, 2018
@chros73 chros73 changed the title Fix 'list' type method Fix 'list' method type Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant