Setting structure to null

416 views
Skip to first unread message

Adam Mielcarski

unread,
Dec 12, 2000, 9:55:38 AM12/12/00
to
Does anybody know how o set all variables in structure to null with one
command?

Regards

Adam

Uwe Sauerbrey

unread,
Dec 12, 2000, 10:10:43 AM12/12/00
to
Not really sure, but what about

structure myst_1, myst_2
... assigning values to myst_1...
// to clear the values in myst_1
myst_1 = myst_2

That way works with arrays, I never tried it with structures.

HTH
Uwe

"Adam Mielcarski" <amie...@polbox.com> schrieb im Newsbeitrag
news:3A363C6A...@polbox.com...

Roy Kiesler [TeamSybase]

unread,
Dec 12, 2000, 10:50:27 AM12/12/00
to
You can use the ZeroMemory Win32 API, but that requires you to know the size
of the structure in bytes. For simple structures, this is an easy task. For
more complex structures, it can be tricky.

--
<iwantmysizeoffunctioninpb8 />
Roy Kiesler [TeamSybase]
mySybase - http://my.sybase.com

"Adam Mielcarski" <amie...@polbox.com> wrote in message
news:3A363C6A...@polbox.com...

David Engh

unread,
Dec 12, 2000, 2:00:23 PM12/12/00
to
Do the structure members need to be NULL or uninitialised? If the
latter, try this:

struct_name lstruct
... <other code but NO assignments to lstruct or its members>
mystruct = lstruct

hth,
DaveE

Jarek Mosiejewski

unread,
Dec 13, 2000, 6:50:10 AM12/13/00
to
Try this

PowerObject lpo_null
SetNull (lpo_null)
lstr_mystr = lpo_null

Regards
Jarek

"Adam Mielcarski" <amie...@polbox.com> wrote in message
news:3A363C6A...@polbox.com...

Reply all
Reply to author
Forward
0 new messages