sirjo66 Well-Known Member Licensed User Longtime User Feb 16, 2013 #1 This code works: B4X: If File.IsDirectory(strDir, strFile) Then This NOT works: B4X: If Not File.IsDirectory(strDir, strFile) Then it tell me: syntax error ..... why ??? I need to write B4X: If File.IsDirectory(strDir, strFile) = False Then but is not very good Sergio
This code works: B4X: If File.IsDirectory(strDir, strFile) Then This NOT works: B4X: If Not File.IsDirectory(strDir, strFile) Then it tell me: syntax error ..... why ??? I need to write B4X: If File.IsDirectory(strDir, strFile) = False Then but is not very good Sergio
klaus Expert Licensed User Longtime User Feb 16, 2013 #2 This will work: B4X: If Not(File.IsDirectory(strDir, strFile)) Then Best regards. Upvote 0
sirjo66 Well-Known Member Licensed User Longtime User Feb 16, 2013 #3 klaus said: This will work: B4X: If Not(File.IsDirectory(strDir, strFile)) Then Best regards. Click to expand... Fantastic !! Upvote 0
klaus said: This will work: B4X: If Not(File.IsDirectory(strDir, strFile)) Then Best regards. Click to expand... Fantastic !!
J Jost aus Soest Active Member Licensed User Longtime User Feb 17, 2013 #4 IMHO to many parenthesis needed. But the question remains: Why do we have to use contextual useless parenthesis? B4X: 'Not' should be an operator: 'If Not(b) Then ==> If Not b Then 'Calling a sub without returning a value: 'DoSomething(a) ==> DoSomething a Parenthesis are making the code so C-ish (aka ugly). Last edited: Feb 17, 2013 Upvote 0
IMHO to many parenthesis needed. But the question remains: Why do we have to use contextual useless parenthesis? B4X: 'Not' should be an operator: 'If Not(b) Then ==> If Not b Then 'Calling a sub without returning a value: 'DoSomething(a) ==> DoSomething a Parenthesis are making the code so C-ish (aka ugly).