DateTimes, LLongs and other 8-byte fields.

Ed Kleban Ed at Kleban.com
Thu Nov 17 15:59:29 CST 2005




On 11/17/05 3:18 PM, "Charles Yeomans" <yeomans at desuetude.com> wrote:

> 
> On Nov 17, 2005, at 4:12 PM, Ruslan Zasukhin wrote:
> 
>> On 11/17/05 7:53 PM, "Ed Kleban" <Ed at Kleban.com> wrote:
>> 
>>>>> Fair enough, especially since I expect there's some simple way to do
>>>>> this
>>>>> that's not apparent to me.  Possibly by mapping a Memory block
>>>>> pointer
>>>>> to
>>>>> the VField or something.  I'll run this by Thomas Templeton or the
>>>>> NUG
>>>>> list
>>>>> on RB.  Or I see Charles Yeoman is on this list.  He'll likely know.
>>>> 
>>>> It's not hard to get the four-byte pieces. Take the string returned
>>>> from a LLong or ULLong field, stick it into an eight-byte
>>>> MemoryBlock,
>>>> then read out the pieces using MemoryBlock.Long.
>>> 
>>> Ah!  So the string returned by GetString is a binary string. Doh!  Of
>>> course
>>> it is. I was thinking it would be a printable numeric for some stupid
>>> reason. That's the problem with having at least 5 overloaded uses for
>>> the
>>> term "string".
>> 
>> Wait guys.
>> 
>>     longFld.GetString()
>> 
>> Return normal string. Not binary
> 


Thankyou for making my point.  Clearly you read a different meaning into the
word "String" than I ended up concluding was really meant.  Depending upon
precisely what you mean, I'm sure you can read in the RB documentation
places where it will tell you that a string can contain binary.  Consider
for example the difference between the definitions in the language reference
for len(aString) and lenB(aString).

The only way to resolve this is to answer the question Charles asks below.
You have to give us a concrete example using quoted string characters "Like
this" and Hex like this:  0h12F34285    -- without that there's just know
way to have a good clue of either what longFld.GetSting() does or what you
mean to say -- short of looking at one of your fine code examples which is
another way of accomplishing the same thing.

 

> Could you be more precise?  What, exactly, does LLongFld.GetString
> return?
> --------------
> Charles Yeomans
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina




More information about the Valentina mailing list