Casting question
Michael de Haan
mdeh at earthlink.net
Wed Dec 17 06:23:28 CST 2003
Ruslan,
(I do not think this has posted yet...apologise if duplicate)
Please help understand...not sure again if this is Valentina or good
OOP issue.
InDataBase(TestAddRecords)
dim RecID as integer <-----RecID declared as integer
.
.
.
.
curs = SQLSelect( "SELECT RecID FROM Person") // select all records
res = curs.FirstRecord
.
.
RecID = VULong(curs.Field(1) ).value <---value of the Recid of
boPerson is now Cast as VUlong (originally typed as integer)
mTask.TestAddRecords( RecID )
and
(BoTask:) TestAddRecords(PersonID as integer)
mPersonPtr.value = PersonID <---- RecID is passed as VUlong(which I
understand is the type needed for a ptr) but in BoTask, "PersonID" is
typed as an integer which is then passed to mPersonPtr. Why do we have
to have to follow the order of integer---> cast to Vulong ----->
integer. I thought that an integer and VUlong are the same thing? Is
there something about Valentina or is this good programming? Or have I
asked enough yet :-)
More information about the Valentina
mailing list