Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
22
Task/Variable-size-Get/Lasso/variable-size-get.lasso
Normal file
22
Task/Variable-size-Get/Lasso/variable-size-get.lasso
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
local(
|
||||
mystring = 'Hello World',
|
||||
myarray = array('one', 'two', 3),
|
||||
myinteger = 1234
|
||||
)
|
||||
|
||||
// size of a string will be a character count
|
||||
#mystring -> size
|
||||
'<br />'
|
||||
|
||||
// size of an array or map will be a count of elements
|
||||
#myarray -> size
|
||||
'<br />'
|
||||
|
||||
// elements within an array can report size
|
||||
#myarray -> get(2) -> size
|
||||
'<br />'
|
||||
|
||||
// integers or decimals does not have sizes
|
||||
//#myinteger -> size // will fail
|
||||
// an integer can however be converted to a string first
|
||||
string(#myinteger) -> size
|
||||
Loading…
Add table
Add a link
Reference in a new issue