![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Watch out for this discrepancy between Universe and D3 Universe does not insert null using the -1 in a replace. Given the following program AM=CHAR(254) VM=CHAR(253) A=1:VM:2:VM:3:VM:VM:5:VM:6:VM:VM:VM:9 A:=AM:'A':VM:'B':VM:'C':VM:VM:'E':VM:'F':VM:VM:VM: 'I' A:=AM:'A1':VM:'B2':VM:'C3':VM:VM:'E5':VM:'F6':VM:V M:VM:'I9' X='' C=DCOUNT(A<1>,VM) FOR J=1 TO C FOR I=1 TO 3 X<I,-1>=A<I,J NEXT I NEXT J FOR J=1 TO C CRT J: FOR I=1 TO 3 CRT ' ':X<I,J>: NEXT I CRT NEXT J On D3 the output is 1 1 A A1 2 2 B B2 3 3 C C3 4 5 5 E E5 6 6 F F6 7 8 9 9 I I9 But on Universe it is 1 1 A A1 2 2 B B2 3 3 C C3 4 5 E E5 5 6 F F6 6 9 I I9 7 8 9 Ouch! That one caused me some bother. Jeremy Thomson |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
This is one of those "bugs" that's been around since < R83 that we all laughed about when they said, "that's not a bug, that's a feature" or when we said we didn't want to change it because it would "break" otherwise working code. Logically does this make sense: Add nothing to the end of nothing to get something this neither nothing (null) nor anything at all (it's a lone attribute mark). Something in the back of your head says, "Nothing plus nothing equals nothing". But somehow the working public has decided that adding a null to the end of a dynamic array somehow should make the array "different". THIS is why there are different flavors. Mark Brown panzerboy (AT) gmail (DOT) com> wrote in message news:1147926562.891502.132520 (AT) j73g2000cwa (DOT) googlegroups.com... Watch out for this discrepancy between Universe and D3 Universe does not insert null using the -1 in a replace. Given the following program AM=CHAR(254) VM=CHAR(253) A=1:VM:2:VM:3:VM:VM:5:VM:6:VM:VM:VM:9 A:=AM:'A':VM:'B':VM:'C':VM:VM:'E':VM:'F':VM:VM:VM: 'I' A:=AM:'A1':VM:'B2':VM:'C3':VM:VM:'E5':VM:'F6':VM:V M:VM:'I9' X='' C=DCOUNT(A<1>,VM) FOR J=1 TO C FOR I=1 TO 3 X<I,-1>=A<I,J NEXT I NEXT J FOR J=1 TO C CRT J: FOR I=1 TO 3 CRT ' ':X<I,J>: NEXT I CRT NEXT J On D3 the output is 1 1 A A1 2 2 B B2 3 3 C C3 4 5 5 E E5 6 6 F F6 7 8 9 9 I I9 But on Universe it is 1 1 A A1 2 2 B B2 3 3 C C3 4 5 E E5 5 6 F F6 6 9 I I9 7 8 9 Ouch! That one caused me some bother. Jeremy Thomson |
#5
| |||
| |||
|
|
Watch out for this discrepancy between Universe and D3 Universe does not insert null using the -1 in a replace. Given the following program AM=CHAR(254) VM=CHAR(253) A=1:VM:2:VM:3:VM:VM:5:VM:6:VM:VM:VM:9 A:=AM:'A':VM:'B':VM:'C':VM:VM:'E':VM:'F':VM:VM:VM: 'I' A:=AM:'A1':VM:'B2':VM:'C3':VM:VM:'E5':VM:'F6':VM:V M:VM:'I9' X='' C=DCOUNT(A<1>,VM) FOR J=1 TO C FOR I=1 TO 3 X<I,-1>=A<I,J NEXT I NEXT J FOR J=1 TO C CRT J: FOR I=1 TO 3 CRT ' ':X<I,J>: NEXT I CRT NEXT J On D3 the output is 1 1 A A1 2 2 B B2 3 3 C C3 4 5 5 E E5 6 6 F F6 7 8 9 9 I I9 But on Universe it is 1 1 A A1 2 2 B B2 3 3 C C3 4 5 E E5 5 6 F F6 6 9 I I9 7 8 9 Ouch! That one caused me some bother. Jeremy Thomson |
#6
| |||
| |||
|
|
For those of us who must program on multiple platforms, the obvious solution is to _always_ find a way to produce a real number for the append. It will never become an issue that way. And don't depend on any given platform to forever "default" to allowing/disallowing any "assumed" behavior. If it's not explicitly documented, it may come and go with any point release. And even if it _is_ documented, I have found that it's always safer to code as conservatively as possible, both for readability, and for bug/feature-change avoidance. Ed |
#7
| ||||||||
| ||||||||
|
|
What a bunch of topposters people are here :-) Oh well, when in Rome... I agree with Ed. Back when I did a lot of cross platform work I would never use the <-1>. Having spent 13 years in one environment I've gotten out of the habit. Still theres these new fangled $OPTIONS compiler directives these days. I've set up an include file "compileroptions.inc" on the D3 and Universe machines. The D3 machine has nothing but a comment in it. The Universe one has $OPTIONS EXTRA.DELIM $OPTIONS R83.LOCATE Now I can have the same program code on the different machines & they do the same thing. Coo-ol. Back in 'the days' used have a locate subroutine that had the proper format for Altos, GA, Universe, Reality. 75% or it was commented out lines of the locate format for the other machines. :-) Ed Sheehan wrote: For those of us who must program on multiple platforms, the obvious solution is to _always_ find a way to produce a real number for the append. It will never become an issue that way. And don't depend on any given platform to forever "default" to allowing/disallowing any "assumed" behavior. If it's not explicitly documented, it may come and go with any point release. And even if it _is_ documented, I have found that it's always safer to code as conservatively as possible, both for readability, and for bug/feature-change avoidance. Ed My first top posted reply, I feel kinda... dirty. Jeremy Thomson |
|
bunch of irrelevant stuff.... |
|
bunch of irrelevant stuff.... |
|
bunch of irrelevant stuff.... |
|
bunch of irrelevant stuff.... |
|
bunch of irrelevant stuff.... |
|
bunch of irrelevant stuff.... |
|
bunch of irrelevant stuff.... |
#8
| |||
| |||
|
|
Thank God and welcome to the club. Now don't you think this bottom post is a waste of time and effort? Chandru Murthi |
#9
| |||
| |||
|
|
On Fri, 19 May 2006 12:25:40 +0000, murthi wrote: panzerboy (AT) gmail (DOT) com> wrote in message news:1148012279.954923.249890 (AT) j55g2000cwa (DOT) googlegroups.com... What a bunch of topposters people are here :-) Oh well, when in Rome... I agree with Ed. Back when I did a lot of cross platform work I would never use the <-1>. Having spent 13 years in one environment I've gotten out of the habit. Still theres these new fangled $OPTIONS compiler directives these days. I've set up an include file "compileroptions.inc" on the D3 and Universe machines. The D3 machine has nothing but a comment in it. The Universe one has $OPTIONS EXTRA.DELIM $OPTIONS R83.LOCATE Now I can have the same program code on the different machines & they do the same thing. Coo-ol. Back in 'the days' used have a locate subroutine that had the proper format for Altos, GA, Universe, Reality. 75% or it was commented out lines of the locate format for the other machines. :-) Ed Sheehan wrote: For those of us who must program on multiple platforms, the obvious solution is to _always_ find a way to produce a real number for the append. It will never become an issue that way. And don't depend on any given platform to forever "default" to allowing/disallowing any "assumed" behavior. If it's not explicitly documented, it may come and go with any point release. And even if it _is_ documented, I have found that it's always safer to code as conservatively as possible, both for readability, and for bug/feature-change avoidance. Ed My first top posted reply, I feel kinda... dirty. Jeremy Thomson bunch of irrelevant stuff.... bunch of irrelevant stuff.... bunch of irrelevant stuff.... bunch of irrelevant stuff.... buch of irrelevant stuff.... buch of irrelevant stuff.... bunch of irrelevant stuff.... bunch of irrelevant stuff.... bunch of irrelevant stuff.... Thank God and welcome to the club. Now don't you think this bottom post is a waste of time and effort? Chandru Murthi Nope. |
#10
| |||
| |||
|
Took you over a month to scroll down, did it ?Chandru "Tom Rauschenbach" <tomsusenet (AT) tomsdomain (DOT) org> wrote in message news an.2006.06.29.16.46.30.944035 (AT) tomsdomain (DOT) org...On Fri, 19 May 2006 12:25:40 +0000, murthi wrote: panzerboy (AT) gmail (DOT) com> wrote in message news:1148012279.954923.249890 (AT) j55g2000cwa (DOT) googlegroups.com... What a bunch of topposters people are here :-) Oh well, when in Rome... I agree with Ed. Back when I did a lot of cross platform work I would never use the <-1>. Having spent 13 years in one environment I've gotten out of the habit. Still theres these new fangled $OPTIONS compiler directives these days. I've set up an include file "compileroptions.inc" on the D3 and Universe machines. The D3 machine has nothing but a comment in it. The Universe one has $OPTIONS EXTRA.DELIM $OPTIONS R83.LOCATE Now I can have the same program code on the different machines & they do the same thing. Coo-ol. Back in 'the days' used have a locate subroutine that had the proper format for Altos, GA, Universe, Reality. 75% or it was commented out lines of the locate format for the other machines. :-) Ed Sheehan wrote: For those of us who must program on multiple platforms, the obvious solution is to _always_ find a way to produce a real number for the append. It will never become an issue that way. And don't depend on any given platform to forever "default" to allowing/disallowing any "assumed" behavior. If it's not explicitly documented, it may come and go with any point release. And even if it _is_ documented, I have found that it's always safer to code as conservatively as possible, both for readability, and for bug/feature-change avoidance. Ed My first top posted reply, I feel kinda... dirty. Jeremy Thomson bunch of irrelevant stuff.... bunch of irrelevant stuff.... bunch of irrelevant stuff.... bunch of irrelevant stuff.... buch of irrelevant stuff.... buch of irrelevant stuff.... bunch of irrelevant stuff.... bunch of irrelevant stuff.... bunch of irrelevant stuff.... Thank God and welcome to the club. Now don't you think this bottom post is a waste of time and effort? Chandru Murthi Nope. |
![]() |
| Thread Tools | |
| Display Modes | |
| |