Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #1039 > unrolled thread

Strange Cannot Solve, Help Needed...

Started by"Darmadi" <support@gfsoftindo.com>
First post2011-05-04 10:50 +0700
Last post2011-05-07 07:40 -0700
Articles 6 — 4 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Strange Cannot Solve, Help Needed... "Darmadi" <support@gfsoftindo.com> - 2011-05-04 10:50 +0700
    Re: Strange Cannot Solve, Help Needed... dlzc <dlzc1@cox.net> - 2011-05-04 11:01 -0700
    Re: Strange Cannot Solve, Help Needed... "Jamal" <vodotnet_nospam@yahoo.com> - 2011-05-04 14:13 -0400
    Re: Strange Cannot Solve, Help Needed... "Geoff Schaller" <geoffx@softwarexobjectives.com.au> - 2011-05-04 21:23 +0000
    Re: Strange Cannot Solve, Help Needed... "Darmadi" <support@gfsoftindo.com> - 2011-05-05 09:59 +0700
      Re: Strange Cannot Solve, Help Needed... dlzc <dlzc1@cox.net> - 2011-05-07 07:40 -0700

#1039 — Strange Cannot Solve, Help Needed...

From"Darmadi" <support@gfsoftindo.com>
Date2011-05-04 10:50 +0700
SubjectStrange Cannot Solve, Help Needed...
Message-ID<ipqiea$lfa$1@speranza.aioe.org>
Hi to all,

? Val("000000000001")       >> result will be : 1

But in one PC, Windows XP SP2, the result become : 0

Any clue for it ?

additional info:

? Val("000001")    > result will be : 1      all pc no problem.


Regards,
Darmadi

[toc] | [next] | [standalone]


#1045

Fromdlzc <dlzc1@cox.net>
Date2011-05-04 11:01 -0700
Message-ID<bcf79ebf-94ec-44a4-9989-8f9d3bfb68f8@17g2000prr.googlegroups.com>
In reply to#1039
Dear Darmadi:

On May 3, 8:50 pm, "Darmadi" <supp...@gfsoftindo.com> wrote:
> Hi to all,
>
> ? Val("000000000001")       >> result will be : 1
>
> But in one PC, Windows XP SP2, the result
>    become : 0
>
> Any clue for it ?
>
> additional info:
>
> ? Val("000001")    > result will be : 1      all pc no problem.

It probably has to do with the conversion from string to numeric.
Using a default conversion can result in a conversion you do not like.

Obviously, you can eliminate the leading "0" characters, and the
problem goes away.  Or you can convert the string into a double or
long integer and solve it that way (perhaps).

David A. Smith

[toc] | [prev] | [next] | [standalone]


#1048

From"Jamal" <vodotnet_nospam@yahoo.com>
Date2011-05-04 14:13 -0400
Message-ID<ips515$9np$1@dont-email.me>
In reply to#1039
I do not know if SetDigit() has any effect. Please check the docs.

Jamal

"Darmadi"  wrote in message news:ipqiea$lfa$1@speranza.aioe.org... 

Hi to all,

? Val("000000000001")       >> result will be : 1

But in one PC, Windows XP SP2, the result become : 0

Any clue for it ?

additional info:

? Val("000001")    > result will be : 1      all pc no problem.


Regards,
Darmadi

[toc] | [prev] | [next] | [standalone]


#1051

From"Geoff Schaller" <geoffx@softwarexobjectives.com.au>
Date2011-05-04 21:23 +0000
Message-ID<4dc1c3e9$0$99947$c30e37c6@exi-reader.telstra.net>
In reply to#1039
As Dave suggests, it will be something to do with the local regional 
settings (assuming it is the same code). It is a ridiculous number so 
remove the leading zero's. They are all perfectly redundant.

Geoff



"Darmadi" <support@gfsoftindo.com> wrote in message 
news:ipqiea$lfa$1@speranza.aioe.org:

> Hi to all,
>
> ? Val("000000000001")       >> result will be : 1
>
> But in one PC, Windows XP SP2, the result become : 0
>
> Any clue for it ?
>
> additional info:
>
> ? Val("000001")    > result will be : 1      all pc no problem.
>
>
> Regards,
> Darmadi

[toc] | [prev] | [next] | [standalone]


#1063

From"Darmadi" <support@gfsoftindo.com>
Date2011-05-05 09:59 +0700
Message-ID<ipt3qa$v5l$1@speranza.aioe.org>
In reply to#1039
Thanks all,

SetDigit() does not effect anything in here...

Yes, I have check on regional setting, but nothing unusual... same as other 
PC.
Is it posible set by windows policy somewhere?

Truncate the zero, this what I do now, but should know the real causing 
problem.
I'm afraid there is will be another problem occur.

Regards,
Darmadi 

[toc] | [prev] | [next] | [standalone]


#1073

Fromdlzc <dlzc1@cox.net>
Date2011-05-07 07:40 -0700
Message-ID<d15f1991-3482-4b17-8147-9dd65d26c8fb@18g2000prd.googlegroups.com>
In reply to#1063
Dear Darmadi:

On May 4, 7:59 pm, "Darmadi" <supp...@gfsoftindo.com> wrote:
> Thanks all,
>
> SetDigit() does not effect anything in here...
>
> Yes, I have check on regional setting, but
> nothing unusual... same as other PC.
> Is it posible set by windows policy somewhere?
>
> Truncate the zero, this what I do now, but
> should know the real causing problem.
> I'm afraid there is will be another problem
> occur.

The "other PC" is 32-bit, is AMD vs. Intel, is with processor as
shipped from factory vs. having been "unlocked"?  You may have to
satisfy yourself that you may never "know".

The length of the string is too long for a 16-bit integer
representation, had any of the early characters been non-zero.  So it
may have been "by default in code" passed to a 4-byte float handler,
rather than to a long integer or 8-byte float handler.

If you cannot find what sets this one machine apart, then you'll need
to write a wrapper function for "val()", and preprocess the string as
makes sense.  Remove leading zeros.  If it contains a decimal, remove
trailing zeros too.  Or, if VO has public functions to do a specific
conversion (string -> long int, string -> long float), you could
specifically use one of those.

No response required.

David A. Smith

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web