[Implemented] Ensure the variable is assigned a value

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
TRN
New User
New User
Posts: 6
Joined: Fri Feb 13, 2004 11:43 pm

[Implemented] Ensure the variable is assigned a value

Post 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.
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post 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...
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

Post 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.
TRN
New User
New User
Posts: 6
Joined: Fri Feb 13, 2004 11:43 pm

Post 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)
Post Reply