Skip to content

Commit

Permalink
Merge pull request #706 from eksortso/i701_9_example
Browse files Browse the repository at this point in the history
Clarify example showing how to add new keys
  • Loading branch information
pradyunsg authored Feb 20, 2020
2 parents 68076ff + a071b75 commit 83cc3b7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,21 @@ As long as a key hasn't been directly defined, you may still write to it and
to names within it.

```
# This makes the key "fruit" into a table.
fruit.apple.smooth = true
# So then you can add to the table "fruit" like so:
fruit.orange = 2
```

```
# THIS IS INVALID
# THE FOLLOWING IS INVALID
# This defines the value of fruit.apple to be an integer.
fruit.apple = 1
# But then this treats fruit.apple like it's a table.
# You can't turn an integer into a table.
fruit.apple.smooth = true
```

Expand Down

0 comments on commit 83cc3b7

Please sign in to comment.