Вниз
Скачать: CL | DM;

присвоение переменным значения Null   Найти похожие ветки 

← →
Serguar ©   (2003-05-20 10:01) [0]

Привет Всем! Разбирая некоторые исходники (не мои), часто сталкиваюсь с присваением некоторым переменным значения Null. Сначало я думал что это опечатка при переносе из C++ и заменял значение на 0. Процесс довольно нудный. Но такая фигня что то очень часто всетречается. В разделе описания констант Null не присутствует. Поэтому я пришел к выводу, что константу Null можно использовать если что нибудь поправить в настройках Delphi. Может быть кто нибудь в курсе каким образом это делается.


← →
Digitman ©   (2003-05-20 10:13) [1]

Null в OP - далеко не то же самое, что и Null в C/C++

фрагмент хэлпа :

Null represents the null Variant.

Unit

System

Category

variant support routines

var Null: Variant;

Description

Use Null to indicate unknown or missing data. Null can be assigned to variables in an application that must contain a null value. Assigning Null to a Variant variable does not cause an error, and Null can be returned from any function with a Variant return value.

Assigning Null to a variable of any type other than Variant causes either a compile-time error or raises an EVariantError exception. For example, in the following code the assignment of v, the Null Variant, to Variant q is successful; whereas the conversion of Variant v, which is now Null, to the integer return type of the Test function, raises an exception.

Там же есть примеры использования



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.02 c
3-94667
Петров Денис
2003-05-12 09:48
2003.05.29
Timeout expired


1-94957
Adil
2003-05-18 12:09
2003.05.29
HTML colors


14-95110
nikkie
2003-05-11 01:46
2003.05.29
последний спектакль Норд-Оста


1-94914
Tatiana
2003-05-15 10:50
2003.05.29
TAB


8-94972
maxfiles
2003-02-14 05:41
2003.05.29
rm




   Наверх