Types & variable time mismatchArchives Forums/Blitz3D Bug Reports/Types & variable time mismatch
| just try this:|
type asd field a% end type asd.asd = new asd asd\a$ = "asd"
here comes NO compiler error!
a% = 1 a$ = "asd"
the compiler gives us a error.
plz fix it, sometimes it just sucks because you search for days for a b ug in your code ;)
| I did questioned about this to. And the awnser i simple. If you declared a variable say 'a' and you make it a integer, its not possilble to make the same variable and give it another declaration say's STRING. One Variable can not have two declarations at the same time. So if you make one you can't use it for something else than that you made it for. |
| WildStorm is talking about a problem where the check is not made. In this case, with types there is no checking! |
| interesting!!!! |
| I've come across this before but can't remember what the explanation was. :) |
| For a type its simple Every type gets its own pointer. So every new type is a NEW type. And get its own memory part. So there can be more type whit the same name. |
| Ahem Fernhout, are you sure you did read the orginal post? Or did you post in the wrong thread? |
| hehe I didn't understand a word of that, either. :P |
| i get what he's trying to say- but its wrong :)|
Each new type crates a new instance with a new \a field.
each \a could be a % or a #, or, a $.
Thats what he was trying to say- It's wrong though :)
| Sorry guy's i wasn't paying attention. I did take a good look what he was writing. And he's right the compiler must give a error massage. |