Quantcast
Channel:
Viewing all articles
Browse latest Browse all 43795

Forum Post: typeof variable that's set to NULL

$
0
0

Let's say we have this code:

[ ] ROSStateEnum ee = Normal
[ ] print(typeof(ee))
[ ] ee = NULL
[ ] print(typeof(ee))
[ ] exit


Second typeof crashes because ee is NULL. Is it somehow possible to get typeof variable that's set to NULL? Or maybe set ee to some default value (doesn't matter what if I can then get typeof)?

I've tried this:

ee = 1

but that also doesn't work. I don't know enum's type, so I can't cast 1 to the enum. Any suggestions would be appreciated. 


Thanks!



Viewing all articles
Browse latest Browse all 43795

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>