main logo
Subject: Re: revdb REV2
Author: Ruslan Zasukhin
Posted: 2001/12/29 17:51:53
 
View Entire Thread
New Search


on 12/30/01 0:34, diskot123 .AT. juno .D.OT com at diskot123@juno.com wrote:

>> They just not needed. There is no any code that depend on them,
>> I was able compile that files without them
> Well as I said in another message, they are needed now. So I've added
> getfieldtype back to vxcmdrev.cpp and I'll also add getfieldflag if you
> removed it. One of the new features of the next revdb is to be able to
> get some schema information on the fields and their datatypes, and if
> they support NULL, ect.
>
> Also another thing which is important, I prefer to use Bool as opposed to
> bool throughout the external. This is because Windows, and other
> platforms give me problems..(and if I don't want to play
> define/redefinition games) so I use Bool is defined in xcmdglue. So when
> I send you back the sources you'll see I did a find and replace, from
> bool to Bool, true to True, false to False.

No problems.

> Also any advantage in defining outlength in VREVDB_GetData as long rather
> than int (int is not big enough?). Same question applies to all the
> functions, why long as opposed to unsigned int? Isn't a pointer on most
> systems, 32 bits (4 bytes), so unsigned int should be fine.

Aha, good question !!!!!!!!!!!

I forget to talk with you about this.

I HATE, VERY VERY VERY HATE using of int. !!!!!!!!!!!!!!

If you'd look into Valentina sources, you will NOT find using of int
anywhere!

This is because as you know sizeof 'int' can depend on platform.
It can be 2 bytes, 4 bytes, and I think even 8 bytes for 64-bit CPUs.

So I prefer use explicit types as short, long and llong,
As well as ushort, ulong and ullong for positive range.

I very recommend you to replace in all your code int on one of above type.
You lose nothing, but you get code that will work as expected on any
platform, CPU and compiler.

-------
BTW, I know may be one case when using of INT is require.

Some algorithms are faster if do work on iteration of array by WORD of CPU.
For example in Valentina's bit set classes functions union(), intersection()
use iteration by int*


--
Best regards,
Ruslan Zasukhin

-------------------------
Paradigma.

e-mail: ruslan .AT. paradigmasoft .D.OT com
web : http://www.paradigmasoft.com

To subscribe to the Valentina mail list
send a letter to valentina-on@lists.macserve.net
 
©2001 Ruslan Zasukhin
<-- Prior Message New Search Next Message -->