Skip to content

Instantly share code, notes, and snippets.

@KateLin-BASIC
Created April 3, 2022 08:59
Show Gist options
  • Save KateLin-BASIC/4c19d354bedd099341ae24b5b5125989 to your computer and use it in GitHub Desktop.
Save KateLin-BASIC/4c19d354bedd099341ae24b5b5125989 to your computer and use it in GitHub Desktop.
Creation of Literal Array And Dynamic Array in Pharo
| literal dynamic dynamicWithSemanticSugar |
literal := #(Bill Zoey Louis Francis).
dynamic := (Array new: 4)
at: 1 put: 'Bill';
at: 2 put: 'Zoey';
at: 3 put: 'Louis';
at: 4 put: 'Francis'.
dynamicWithSemanticSugar := { 'Bill'. 'Zoey'. 'Louis'. 'Francis' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment