global init within type bug
BlitzMax Forums/BlitzMax Programming/global init within type bug
| ||
Type tCursor Field typ:Int Field pwr:Int Global cursor:tCursor = New tCursor End Type cursor.typ = 10 Results in: Compile Error Identifier 'cursor' not found |
| ||
You need to address the cursor as tCursor.cursor.type=10 Its not a bug you have incorrect scope. The global cursor is member of tCursor Doug Stastny |
| ||
Ah, my misunderstanding. I was incorrectly advised that a global within a type, was actually global to the entire program. Thanks for your clarification. A final question: Are globals from within the type scope as fast as globals within the program scope? |