0, "" (empty string), null, empty, difference between Nothing

xiaoxiao2021-03-06  111

0, "" (empty strings), null, empty, and Nothing difference first answer the following questions! After the following narrative, the variables A, B, C, D are equal to 0, "", null, EMPTY, NOTHING which one is equal to, respectively. DIM Adim B AS Stringdim C AS Integerdim D as Objecta is equal to EMPTY, because the "unstatis-type variable" that has not been initialized is equal to EMPTY. But if A = "or A = 0 is detected, a TRUE value can also be obtained. B is equal to "", because the non-fixed length "string" that has not been initialized is equal to "" ". But please note B <> NULL. C is equal to 0, is this still problem? D is equal to Nothing, the "object variable" that has not been set is equal to Nothing, but do not use D = Nothing, and use D is nothing to determine whether D is equal to Nothing, because it is determined whether the equal symbol is IS is not =. The most confusing place is Null this reserved word, please see the following statement: Print x = nullprint x <> null results are output null (not TRUE is not false), because any of the arithmetic is as long as NULL, then This arithmetic is equal to NULL, in fact, if you want to determine if a data is NULL absolutely unused: if x = null dam will always get null: if isnull (x) THEN which data will be equal to NULL? ? In addition to the NULL operation, "Data Field" (in the database) that does not input any data is equal to NULL.

转载请注明原文地址:https://www.9cbs.com/read-105183.html

New Post(0)