Page 1 of 1

[Implemented] Ensure the variable is assigned a value

Posted: Fri Feb 13, 2004 11:54 pm
by TRN
Hi.. I just started testing PureBasic, and as a former Amiga assembler coder i find PB quite amusing :)

now.....this is essential...
The compiler must make sure the Variable is assigned a value or else let the user know!!! or let there be an option to turn this on.. i cant quite remember what this is called.... let me give you an example.

i had this line in my PB code:
assx.f = PeekF(*pts_data_zzdepoints+bfr_ptr1+4)

now... the line should have been:
assx.f = PeekF(*ptr_data_zzdepoints+bfr_ptr1+4)

..and quess what... finding these kinds of bugs is really annoying!!!!! :evil:

(Implemented as 'EnableExplicit')



...really would like to have this option in the compiler.. i know all u ppl who know how to code, agree on this.

Posted: Sat Feb 14, 2004 12:03 am
by Pupil
This has been asked for before and i believe it's on Fred's ever growing TODO list. Search for the word 'Explicit' and you'll likely find a bunch of discussions on this issue...

Posted: Sat Feb 14, 2004 12:16 am
by Justin
i asked for this too, it's a bit scaring. this things can end with a big project, hope Fred will include it.

Posted: Sat Feb 14, 2004 12:35 am
by TRN
Explicit!

... that was just what i wanted to hear.
...i was a little stunned when i couldnt find a way to ensure my variables was assigned, but since its allready an issue, i know it will be implemented in a future release (hopefully the next).. it IS essential!



thanks again for the replies 8)