You cannot call a method on a basic type, such as int, long, double, or decimal, in a conditional compilation block, or an enumerated type. For example, this code generates the compiler error “C0316: Function scope cannot be of type int”:
string s #if defined PBDOTNET then int i s = i.ToString() // generates error MessageBox("String", s) #end if
Calling the ToString method on an enumerated type produces the same error. PowerBuilder allows methods to be called only on classes and interfaces.