Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Using External Code in LabVIEW.pdf
Скачиваний:
48
Добавлен:
29.05.2015
Размер:
1.85 Mб
Скачать

Chapter 6 Function Descriptions

ClearMem

void ClearMem(p, size);

Purpose

Sets size bytes starting at the address referenced by p to 0.

Parameters

Name

Type

Description

 

 

 

 

 

 

p

UPtr

Pointer to block of memory you want to

 

 

clear.

 

 

 

size

int32

Number of bytes you want to clear.

 

 

 

Using External Code in LabVIEW

6-38

www.ni.com

Chapter 6 Function Descriptions

CPStrBuf

Macro

uChar *CPStrBuf(sp);

Purpose

Returns the address of the first string in a concatenated list of Pascal strings, that is, the address of sp->str.

Parameters

Name

Type

Description

 

 

 

 

 

 

sp

CPStrPtr

Pointer to a concatenated list of Pascal

 

 

strings.

 

 

 

Return Value

The address of the first string of the concatenated list of Pascal strings.

© National Instruments Corporation

6-39

Using External Code in LabVIEW

Chapter 6 Function Descriptions

CPStrCmp

int32 CPStrCmp(s1p, s2p);

Purpose

Lexically compares two concatenated lists of Pascal strings to determine whether one is less than, equal to, or greater than the other. This comparison is case sensitive, and the function compares the lists as if they were one string.

Parameters

Name

Type

Description

 

 

 

 

 

 

s1p

CPStrPtr

Pointer to a concatenated list of Pascal

 

 

strings.

 

 

 

s2p

CPStrPtr

Pointer to a concatenated list of Pascal

 

 

strings.

 

 

 

Return Value

<0, 0, or >0 if s1p is less than, equal to, or greater than s2p, respectively. Returns <0 if s1p is an initial substring of s2p.

Using External Code in LabVIEW

6-40

www.ni.com

Chapter 6 Function Descriptions

CPStrIndex

PStr CPStrIndex(s1h, index);

Purpose

Returns a pointer to the Pascal string denoted by index in a list of strings. If index is greater than or equal to the number of strings in the list, this function returns the pointer to the last string.

Parameters

Name

Type

Description

 

 

 

 

 

 

s1h

CPStrHandle

Handle to a concatenated list of Pascal

 

 

strings.

 

 

 

index

int32

Number of the string you want, with 0 as the

 

 

first string.

 

 

 

Return Value

A pointer to the specified Pascal string.

© National Instruments Corporation

6-41

Using External Code in LabVIEW

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]