Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,2 @@
Buff(100)→Str1
.Str1 points to a 100-byte memory region allocated at compile time

View file

@ -0,0 +1,6 @@
-- Create a ByteArray of 100 Kb (pre-filled with 0 bytes)
ba = byteArray(102400)
-- Lingo uses garbage-collection, so allocated memory is released when no more references exist.
-- For the above variable ba, this can be achieved by calling:
ba = VOID

View file

@ -0,0 +1,7 @@
# Allocate thread local heap memory
var a = alloc(1000)
dealloc(a)
# Allocate memory block on shared heap
var b = allocShared(1000)
deallocShared(b)

View file

@ -0,0 +1,5 @@
atom addr = allocate(512) -- limit is 1,610,612,728 bytes on 32-bit systems
...
free(addr)
atom addr2 = allocate(512,1) -- automatically freed when addr2 drops out of scope or re-assigned
atom addr3 = allocate_string("a string",1) -- automatically freed when addr3 drops out of scope or re-assigned

View file

@ -0,0 +1,2 @@
cVar = " " # create variable contains string of 5 bytes
cVar = NULL # destroy the 5 bytes string !