[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Global conflicts (long, sorry!)
- Subject: Global conflicts (long, sorry!)
- From: Carl Distefano 70154.3452@xxxxxxxx
- Date: 03 Nov 95 18:06:53 EST
Tim: I've always wondered about those "global" routines in
XY4.DLG. Many of them seem hardly worth the candle. JM
(SetER11)? 12 bytes of code calling a 750K DLG file to
accomplish what could be done directly in 5 bytes [BX ()],
assuming error suppression is already toggled on? Anyone who
knows enough XPL to write a routine that uses "JM (SetER11)" must
know enough to state "BX ()" and be done with it. What were the
developers thinking of?
More fundamentally, what about Save/Get conflicts? The global
SUBs use programming S/Gs scattered over the 01-99 "transient" range (40-45, 67, 78-
79 in just the routines you describe in your first installment).
How are we the consumers of this factory-issued XPL supposed to know what S/Gs are
"safe" for use in our own routines, so that everything doesn't
grind to a halt when we JM (global)? The .DLG file says
"TEMPORARY SAVE/GETS -- Some are reserved, others are unreserved
(00-99)" -- but doesn't say which!
(CHKSEQ reports that my copy of XY4.DLG, delivery date
12/12/94, uses the following transient S/Gs [the asterisk
denotes S/Gs introduced out of sequence]:
01-06,07*-09,10*,11*-
16,17*,18*,19*,20*-22,23*-24,25*,30-34,39*,40*-44,45*-48,49*-
54,60*,61*,65,66*-68,69*-75,76*-82,87,88*,89*,90*-92,95*-
97,98*,99*. For the curious, the full CHKSEQ report appears
at
the end of this message.)
Without clearly-declared and universally-accepted "safe zones",
especially in the 01-99 range which we've been led to believe is
available for general use, any hope of a more structured XPL is doomed. This is the issue that
Robert and I address -- to the resounding silence of the XPL
community, but never mind -- in REORGaNiZe (REORGNZ2.ZIP, which
includes CHKSEQ). The question is so basic that one wonders how
TTG has avoided coming to grips with it, except to legislate
certain protected ranges as off-limits to users. Surely we're
not expected to use stay-resident S/Gs (100-999,
"Reserved for users") in *all* our programming, whether they're
needed or not!?
Even a well thought-out scheme, however, tumbles on the fact that *all*
S/Gs, however and whenever used, are "global" variables with
system-wide effect. You can't declare a local variable in XPL as
you can, e.g., in C. (I wonder what it would take to add that
feature?) Therefore, sooner or later, S/G conflicts *will* occur
and the attempt at structure will collapse. It's inevitable.
Even the strictest legislative scheme can't get around the laws
of probability.
Anyway, Tim, I don't mean to throw cold water on your
undertaking. On the contrary, what you're doing is invaluable.
By all means, continue to enlighten us on the inner workings of
Xy4/XyWin! If it gives us occasion to discuss first principles,
so much the better.
--------------
Carl Distefano
70154.3452@xxxxxxxx
CHKSEQ.RPT showing Save/Get usage for XY4.DLG (delivery date
12/12/94); asterisks denote Save/Gets introduced out of sequence:
01-06,07*-09,10*,11*-16,17*,18*,19*,20*-22,23*-24,25*,30-34,39*,4
0*-44,45*-
48,49*-54,60*,61*,65,66*-68,69*-75,76*-82,87,88*,89*,90*-92,95*-9
7,98*,99*-
101,102*-109,110*,111*,120-124,126,130*-134,140-144,150-154,161-1
63,201-
210,1000*,1001*,1002*-1014,1015*-1016,1017*-1025,1026*-1029,1030*
-
1039,1040*-1048,1050*-1057,1060*-1067,1071-1072,1073*-
1078,1081*,1083,1084*,1085*-1086,1088,1089*-1090,1091*-1094,1095*
-
1097,1098*-1099,1100*-1105,1106*-1108,1109*-1110,1111*,1112*-1114
,1115*-
1119,1120*-1124,1125*,1126*,1127*,1128*-1129,1130*-1131,1132*,113
3*-
1134,1135*-1138,1140*-1142,1143*-1144,1149,1150*,1151*-1152,1153*
-
1154,1155*-1157,1158*-1160,1161*-1162,1163*-1164,1171-1172,1181-1
182,1191*-
1192,1195-1196,1197*-1198,1199*,1200*-1204,1205*-1217,1218*,1219*
,1220*-
1221,1222*-1223,1224*-1227,1228*-1229,1230*,1231*-1232,1233*-1235
,1239*-
1240,1250*,1251*-1270,1297*,1298*-1299,1300*-1301,1302*-1303,1304
*-
1310,1311*,1313*,1351-1353,1354*-1356,1390*-1393,1394*-1395,1396*
-
1397,1398*-1399,1401-1404,1778*,1800*-1801,1802*-1803,1805*,1806*
-
1808,1809*-1811,1812*,1813*-1815,1816*,1817*,1818*-1820,1821*-182
3,1824*-
1825,1827-1829,1830*-1831,1832*-1833,1836,1837*-1838,1839*-1841,1
842*,1844-
1845,1846*-1847,1848*-1849,1850*-1852,1853*,1854*-1856,1857*-
1858,1859*,1860*,1862-1863,1864*,1865*,1866*-1869,1870*-1871,1872
*-
1874,1875*-1876,1879*,1880*,1889,1890*,1891*,1900*-1901,1904-1908
,1910-
1912,1915,1916*,1920,1921*-1923,1924*,1925*-1932,1933*,1941,1944*
,1945*-
1946,1951-1957,1959,1964*-1966,1967*-1968,1970,1971*-1973,1974*-1
975,1976*-
1978,1980*,1981*-1982,1983*-1984,1986*-1988,1990-1993,1999