#library "Library/Example/xstring.object" avr.device = atmega328p avr.clock = 20000000 avr.stack = 96 uart.baud = 19200 ' Baudrate uart.recv.enable ' Senden aktivieren uart.send.enable ' Empfangen aktivieren dim value as word dim a,b,r as xstring print 12 wait 1 a = new xstring("This is") b = new xstring(" just ") 'the address of the objects data blocks (memoryblock) print "a.Ptr = 0x";hex(a.Ptr) print "b.Ptr = 0x";hex(b.Ptr) 'the content of the objects print "a = ";34;a;34 print "b = ";34;b;34 r = a + b + "amazing!" print "r.Ptr = 0x";hex(r.Ptr) print "r = ";34;r;34 'calling a function of the object print "r.reverse = ";34;r.reverse;34 'calling a function who returns a object print "return value of function 'test()' = ";34;test();34 'destroy a object r = nil halt() 'object as return value function test() as xstring return new xstring("test") endfunc