Gif Posted December 2, 2007 Posted December 2, 2007 (edited) Are there any functions, in autoit, alike to IsNull() or LBound()? Edited December 2, 2007 by Gif
Gif Posted December 2, 2007 Author Posted December 2, 2007 (edited) LBound()Ok got it, how about IsNull()? (basicly checks for invalid content in a variable) Edited December 2, 2007 by Gif
Developers Jos Posted December 2, 2007 Developers Posted December 2, 2007 Ok got it, how about IsNull()? (basicly checks for invalid content in a variable)Do you have an example were you can use it in AutoIt3 syntax? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Gif Posted December 2, 2007 Author Posted December 2, 2007 (edited) For $Obj_Items In $Col_Items Local $IntFreeSpace = $Obj_Items.FreeSpace If ((String($IntFreeSpace) == '') Or (Number($IntFreeSpace) = 0)) Then ; IsNull() check should be here Local $m_Text = 'No disk in floppy drive.' Else Local $m_Text = 'Disk found in the floppy drive.' EndIf Next The Null value indicates that the variable contains no valid data. Null is not the same as Empty, which indicates that a variable has not yet been initialized. It is also not the same as a zero-length string (""), which is sometimes referred to as a null string. I know it's not THAT important but sometimes it might be needed for better coding. Edited December 2, 2007 by Gif
Valik Posted December 2, 2007 Posted December 2, 2007 For $Obj_Items In $Col_Items Local $IntFreeSpace = $Obj_Items.FreeSpace If ((String($IntFreeSpace) == '') Or (Number($IntFreeSpace) = 0)) Then ; IsNull() check should be here Local $m_Text = 'No disk in floppy drive.' Else Local $m_Text = 'Disk found in the floppy drive.' EndIf Next I know it's not THAT important but sometimes it might be needed for better coding.If Not $IntFreeSpace Then .... An empty string and 0 both test as false.
jvanegmond Posted December 3, 2007 Posted December 3, 2007 (edited) An empty string and 0 both test as false.The way you said that made me remember there are a lot of kinds of nothing. 0 "0" "" Chr(0) NULL Empty Nothing Edited December 3, 2007 by Manadar github.com/jvanegmond
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now