26 lines
897 B
Plaintext
26 lines
897 B
Plaintext
dim a as long // dim var as type
|
|
|
|
dim as long b // dim as type var
|
|
|
|
long c // 'dim as' is optional
|
|
|
|
c = 123 // assign
|
|
long x, y, z // declarate multiple vars
|
|
CFStringRef s1 = @"Alpha" // declare and assign in same statement
|
|
CFArrayRef array = @[s1,s2] // declare and assign a CFArray
|
|
CFDictionaryRef dict = @{@"key1":@"value1",@"key2":@"value2"} // declare and assign a CFDictionary
|
|
|
|
CFDictionaryRef d = @{ // assignment of CFDictionaries
|
|
@"color":fn ColorRed, // and CFArrays can be broken
|
|
@"size":@(12), // into multiple lines
|
|
@"sound":@"frog"}
|
|
|
|
CGPoint pt = {100,200} // declare and assign record (struct)
|
|
|
|
MKMapRect rMap = {{123,456},{200,300}} // declare and assign nested records
|
|
|
|
CGRect r = (10,20,30,40) // convenience for CGRect - omit inner curly braces
|
|
|
|
long b(5) // declare c-type array
|
|
long c(3) = {1,2,3,4} // declare and assign c-type array
|