String pointers

BlitzMax Forums/BlitzMax Programming/String pointers

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Ha I knew I would succeed ;-)

Strict

Type Test
	Field name:String
	Field StringVar:Byte Ptr
	
	Method toString1()
		Print "Name: " + name
		Print "StringVar: " + String.fromCString(StringVar) 
	End Method
	
End Type


Local teststring:Byte Ptr	= "Test Ptr".toCString()
Local aka:test 			= New test
aka.name	 		= "test"
aka.StringVar			= teststring

Print aka.tostring1() 

MemCopy(teststring,"Papa".toCString(),Len("Papa")+1)
aka.tostring1()



Hope this helps ... and thank you for the Script Module