<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://in.compucrete.com/index.php?action=history&amp;feed=atom&amp;title=Bad_Code</id>
	<title>Bad Code - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://in.compucrete.com/index.php?action=history&amp;feed=atom&amp;title=Bad_Code"/>
	<link rel="alternate" type="text/html" href="http://in.compucrete.com/index.php?title=Bad_Code&amp;action=history"/>
	<updated>2026-05-15T16:21:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>http://in.compucrete.com/index.php?title=Bad_Code&amp;diff=58&amp;oldid=prev</id>
		<title>WikiAdmin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://in.compucrete.com/index.php?title=Bad_Code&amp;diff=58&amp;oldid=prev"/>
		<updated>2023-07-14T12:58:48Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:58, 14 July 2023&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key my_wiki:diff::1.12:old-57:rev-58 --&gt;
&lt;/table&gt;</summary>
		<author><name>WikiAdmin</name></author>
	</entry>
	<entry>
		<id>http://in.compucrete.com/index.php?title=Bad_Code&amp;diff=57&amp;oldid=prev</id>
		<title>Intra&gt;User: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://in.compucrete.com/index.php?title=Bad_Code&amp;diff=57&amp;oldid=prev"/>
		<updated>2017-01-10T00:01:26Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Jim B. Metric Function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
64000 REM metric/standard conversion - FNMETCONV ! 07/12/95 \/&lt;br /&gt;
64005 REM returns loc in vector if a conversion is performed: 0 if not&lt;br /&gt;
64010 REM :METRICSW - is the switch for conversion style&lt;br /&gt;
64015 REM :INUM$ - the incoming um to test for conversion&lt;br /&gt;
64020 REM :&amp;amp;DETCF - the returned detail conversion factor&lt;br /&gt;
64025 REM :&amp;amp;dnum$ - the returned um for detail - c 3&lt;br /&gt;
64030 REM :&amp;amp;tnum$ - the returned um for totals - c 3&lt;br /&gt;
64035 REM ******** notes on FNMETCONV usage *********&lt;br /&gt;
64040 REM may need imast to get UM$ @ pos 21,c 2&lt;br /&gt;
64045 REM may need HUM$=UM$ after totals cleanup to print prev UM$&lt;br /&gt;
64050 REM move to after bisys read ! LET METRICSW:=POS(&amp;quot;1234&amp;quot;,QB$(4)(29:29)) ! 07/12/95&lt;br /&gt;
64055 REM move to after totals processing - before printing new detail - NOTE: NOT AN IF ! LET FNMETCONV(METRICSW,um$,detcf,totcf,dnum$,tnum$,acsw) ! 07/12/95&lt;br /&gt;
64060 REM in program call, METRICSW is only forced var name(is=qb$(4)(29:29))&lt;br /&gt;
64065 REM example - after function call - after qty (re)read - before detail printing ! LET QTY=ROUND(QTY*detcf,2) ! 07/12/95&lt;br /&gt;
64070 REM example - in accumulating section - after detail print - NOTE: ONLY ON K=1 ! TQTY(1)=TQTY(1)+ROUND(QTY*totcf,2) ! 07/12/95&lt;br /&gt;
64100 DEF FNMETCONV(METRICSW,INUM$,&amp;amp;DETCF,&amp;amp;TOTCF,&amp;amp;DNUM$,&amp;amp;TNUM$,&amp;amp;ACSW) ! 07/12/95 \/&lt;br /&gt;
64110 DIM MUM$(1)*4,MCF(1)&lt;br /&gt;
64120 LET DETCF:=TOTCF:=1&lt;br /&gt;
64130 LET DNUM$=TNUM$=INUM$&lt;br /&gt;
64140 IF NOT METRICSW THEN GOTO 64360 ! ? conversion&lt;br /&gt;
64150 IF UDIM(MUM$)&amp;lt;2 THEN GOSUB METSET ! initialize&lt;br /&gt;
64160 IF (SIRCH:=SRCH(MUM$,INUM$))&amp;gt;-1 AND (CMO:=FNCMOD(SIRCH,MUMCOL))&amp;lt;3 THEN &lt;br /&gt;
64170  LET FNMETCONV=SIRCH&lt;br /&gt;
64180  LET ACSW=VAL(MUM$(FNLINR(FNRMOD(SIRCH,MUMCOL),4,MUMCOL))) ! accume ?&lt;br /&gt;
64190   IF FNCMOD(METRICSW,2)&amp;lt;&amp;gt;CMO THEN &lt;br /&gt;
64200    LET TNUM$=(MUM$(SIRCH+3-2*CMO)) ! the other um of the pair&lt;br /&gt;
64210    LET DETCF=MCF(VAL(MUM$(FNLINR(FNRMOD(SIRCH,MUMCOL),3,MUMCOL))))**(-1**(MOD(METRICSW,2))) ! look below for explanation&lt;br /&gt;
64220    IF METRICSW&amp;gt;2 THEN ! totals only&lt;br /&gt;
64230       LET TOTCF=DETCF&lt;br /&gt;
64240       LET DETCF=1&lt;br /&gt;
64250    ELSE LET DNUM$=TNUM$&amp;amp;&amp;quot;*&amp;quot;&lt;br /&gt;
64260   END IF &lt;br /&gt;
64270  GOTO 64380&lt;br /&gt;
64300    REM ******** explanation of equation *********&lt;br /&gt;
64305    REM MCF(VAL(MUM$(FNRMOD(SIRCH,3)*3))) is the conversion multiplier pointed to in MCF from the 3rd element in the row that INUM$ was found in MUM$&lt;br /&gt;
64310    REM mod(metricsw,2) yields 0 if to metric, 1 if to std ...&lt;br /&gt;
64315    REM -1**mod(metricsw,2) yields 1 if std to met, -1 if met to std to invert the conversion factor to met to std&lt;br /&gt;
64320    REM fncmod(sirch,3) yields 1 if is std um, 2 if is metric um, 3 if found the mcf ref thus invalid&lt;br /&gt;
64325    REM fncmod(metricsw,2)&amp;lt;&amp;gt;fncmod(sirch,3) yields 1 if std and convert to met or if met and convert to std i.e. if a conversion is required, 0 if not&lt;br /&gt;
64330    REM conversion factor exponent is n**(1 or -1 to invert), get it?&lt;br /&gt;
64350 END IF &lt;br /&gt;
64360 REM no conversion&lt;br /&gt;
64370 LET FNMETCONV=ACSW=0&lt;br /&gt;
64380 FNEND  ! FNMETCONV() ! 07/12/95 /\&lt;br /&gt;
64400 METSET: ! 07/12/95 \/ setup for FNMETCONV&lt;br /&gt;
64410 DIM MUMSRC$*128&lt;br /&gt;
64420 LET MUMSRC$=&amp;quot;CY,CM,1,2,YD,MR,1,1,TN,MT,2,1,Y,M,1,0,T,TM,2,0&amp;quot; ! english then metric in then mcf reference - is really a ZxMUMCOL matrix&lt;br /&gt;
64430 LET FNMKARAY(MAT MUM$,MUMSRC$,&amp;quot;,&amp;quot;)&lt;br /&gt;
64440 LET MUMCOL=4&lt;br /&gt;
64450 MAT MCF(9)=(0) ! conversion factors in metric per english units&lt;br /&gt;
64460    LET MCF(1)=(2.54*9/25)**3 ! cubic meters per cubic yard&lt;br /&gt;
64470    LET MCF(2)=.453592*2 ! metric tons(1kKg) per english tons(2kLb)&lt;br /&gt;
64480    LET MCF(3)=2.54*9/25 ! linear meter per linear yard&lt;br /&gt;
64490    LET MCF(4)=1 ! &lt;br /&gt;
64500    LET MCF(5)=1 ! &lt;br /&gt;
64510    LET MCF(6)=1 ! &lt;br /&gt;
64520    LET MCF(7)=1 ! &lt;br /&gt;
64530    LET MCF(8)=1 ! &lt;br /&gt;
64540    LET MCF(9)=1 ! &lt;br /&gt;
64550 RETURN  ! METSET ! 07/12/95 /\&lt;br /&gt;
64560 REM ******* notes for METSET ********&lt;br /&gt;
64565 REM matrix elements: x,1-standard um : x,2-metric um : x,3-mcf reference for conversion factor s.t. (x,1)*(x,3)=qty in (x,2) units : x,4-priority for accumulation of um i.e. to accum CY and TN use (x,4)&amp;lt;&amp;gt;0&lt;br /&gt;
64600 DEF FNMETUM$(CRUM$,&amp;amp;CF,&amp;amp;ACSW) ! 07/12/95 \/&lt;br /&gt;
64610   IF UDIM(MUM$)&amp;lt;2 THEN GOSUB METSET&lt;br /&gt;
64620   LET ROCOL=(ROCOL:=0 OR VAL(CRUM$)) CONV 64650 ! is crum$ a um or coords(rr.cc) ?&lt;br /&gt;
64630   LET FNMETUM$=MUM$(FNLINR(INT(ABS(ROCOL)),MOD(3+SGN(ROCOL)*INT(MOD(ABS(ROCOL),1)*100),3),MUMCOL)) ERROR 64690 ! invalid sub&lt;br /&gt;
64640   GOTO 64660&lt;br /&gt;
64650   IF (SIRCH:=SRCH(MUM$,CRUM$))&amp;gt;-1 AND FNCMOD(SIRCH,MUMCOL)&amp;lt;3 THEN LET FNMETUM$=STR$(FNRMOD(SIRCH,MUMCOL)+.01*FNCMOD(SIRCH,MUMCOL)) ELSE GOTO 64690&lt;br /&gt;
64660   LET CF=MCF(VAL(MUM$(FNLINR(FNRMOD(SIRCH,MUMCOL),3,MUMCOL))))&lt;br /&gt;
64670   LET ACSW=VAL(MUM$(FNLINR(FNRMOD(SIRCH,MUMCOL),4,MUMCOL)))&lt;br /&gt;
64680   GOTO 64700&lt;br /&gt;
64690   LET FNMETUM$=&amp;quot;&amp;quot;: LET CF=ACSW=0&lt;br /&gt;
64700 FNEND  ! FNMETUM ! 07/12/95 /\&lt;br /&gt;
64710 REM ******** notes for FNMETUM$ *********&lt;br /&gt;
64720 REM CRUM$ : row and column string as &amp;quot;+rr.cc&amp;quot; or um&lt;br /&gt;
64725 REM &amp;amp;CF : becomes conversion factor&lt;br /&gt;
64730 REM &amp;amp;ACSW : becomes switch setting for if that um's totals are accummed&lt;br /&gt;
64735 REM returns: if crum is a um then returns the &amp;quot;rr.cc&amp;quot; in mum that um was found&lt;br /&gt;
64740 REM : if &amp;quot;rr.cc&amp;quot; then returns the um in that spot&lt;br /&gt;
64745 REM : if &amp;quot;-rr.cc&amp;quot; then returns the other um of the pair&lt;br /&gt;
64750 REM i.e fnmetum$(&amp;quot;-&amp;quot;&amp;amp;fnmetum$(&amp;quot;CY&amp;quot;,x,y),x,y) returns &amp;quot;CM&amp;quot;,x=.76,y=1&lt;br /&gt;
64755 REM FNMETUM$ is NOT DEPENDANT ON METRICSW&lt;br /&gt;
64800 DEF FNMKARAY(MAT TARG$,&amp;amp;SRC$,DL$*1) ! 07/12/95 \/&lt;br /&gt;
64810 REM ******** FNMKARAY usage notes *********&lt;br /&gt;
64820 REM send it an empty array (targ$), a delimited string (src$),&lt;br /&gt;
64830 REM and the deliminter used (dl$). src$ is cleaned up so that&lt;br /&gt;
64840 REM empty elements need to be repped as a space(or else disable&lt;br /&gt;
64850 REM the srep calls. FNMKARAY returns the number of elements.&lt;br /&gt;
64860 MAT TARG$(MKR:=MKL:=0)&lt;br /&gt;
64870 LET SRC$:=DL$&amp;amp;SRC$&amp;amp;DL$&lt;br /&gt;
64880 IF POS(SRC$:=SREP$(SRC$,DL$&amp;amp;DL$,DL$),DL$&amp;amp;DL$) THEN GOTO 64880&lt;br /&gt;
64890 LET MKL=MKR+1&lt;br /&gt;
64900 IF (MKR:=(POS(SRC$,DL$,MKL+1)-1))&amp;lt;0 THEN GOTO 64940&lt;br /&gt;
64910 MAT TARG$(UDIM(TARG$)+1)&lt;br /&gt;
64920 LET TARG$(UDIM(TARG$))=SRC$(MKL+1:MKR)&lt;br /&gt;
64930 GOTO 64890&lt;br /&gt;
64940 LET FNMKARAY=UDIM(TARG$)&lt;br /&gt;
64950 FNEND  ! FNMKARAY ! 07/12/95 /\&lt;br /&gt;
64970 DEF FNLINR(R,C,E)=E*(R-1)+C ! 07/12/95 lin ref - cth el in rth row e cols&lt;br /&gt;
64980 DEF FNCMOD(X,Y)=(MOD(X-1,Y)+1)*(X&amp;gt;0) ! 07/12/95 in which of y column is x&lt;br /&gt;
64990 DEF FNRMOD(X,Y)=INT((X-1)/Y)+1 ! 07/12/95 which row of y columns is x in&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New Function to replace:&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
89110 DIM INUNIT$(1)*2,OUTUNIT$(1)*2,CONVFACT(1)&lt;br /&gt;
89120 DEF FNMETRIC(INUM$,OUTUM$,VALUE) ! 05/14/98 - Metric Conversion Function&lt;br /&gt;
89125 IF UPRC$(INUM$)=UPRC$(OUTUM$) THEN LET FNMETRIC=VALUE: GOTO 89230&lt;br /&gt;
89130 IF UDIM(INUNIT$)&amp;gt;1 THEN GOTO 89180&lt;br /&gt;
89140 OPEN #10: &amp;quot;NAME=METRIC.CFG,SHR&amp;quot;,DISPLAY,INPUT &lt;br /&gt;
89150 INPUT #10: I$,O$,F EOF 89170&lt;br /&gt;
89160 LET X=UDIM(INUNIT$)+1: MAT INUNIT$(X): MAT OUTUNIT$(X): MAT CONVFACT(X): LET INUNIT$(X)=I$: LET OUTUNIT$(X)=O$: LET CONVFACT(X)=F: GOTO 89150&lt;br /&gt;
89170 CLOSE #10: &lt;br /&gt;
89180 LET FOUND=I=FNMETRIC=0&lt;br /&gt;
89190 LET I=I+1&lt;br /&gt;
89200   IF UPRC$(INUM$)=INUNIT$(I) AND UPRC$(OUTUM$)=OUTUNIT$(I) THEN LET FNMETRIC=VALUE*CONVFACT(I): LET FOUND=1&lt;br /&gt;
89210   IF UPRC$(OUTUM$)=INUNIT$(I) AND UPRC$(INUM$)=OUTUNIT$(I) THEN LET FNMETRIC=VALUE/CONVFACT(I): LET FOUND=1&lt;br /&gt;
89220 IF FOUND=0 AND I&amp;lt;UDIM(INUNIT$) THEN GOTO 89190&lt;br /&gt;
89230 FNEND &lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
METRIC.CFG&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
&amp;quot;KG&amp;quot;,&amp;quot;LB&amp;quot;,2.204622&lt;br /&gt;
&amp;quot;MT&amp;quot;,&amp;quot;LB&amp;quot;,2204.6215&lt;br /&gt;
&amp;quot;MT&amp;quot;,&amp;quot;TN&amp;quot;,1.102311&lt;br /&gt;
&amp;quot;CM&amp;quot;,&amp;quot;CY&amp;quot;,1.307873&lt;br /&gt;
&amp;quot;CY&amp;quot;,&amp;quot;CF&amp;quot;,27&lt;br /&gt;
&amp;quot;CM&amp;quot;,&amp;quot;CF&amp;quot;,35.312571&lt;br /&gt;
&amp;quot;M&amp;quot;,&amp;quot;YD&amp;quot;,1.093613&lt;br /&gt;
&amp;quot;MT&amp;quot;,&amp;quot;KG&amp;quot;,1000&lt;br /&gt;
&amp;quot;M&amp;quot;,&amp;quot;IN&amp;quot;,39.30&lt;br /&gt;
&amp;quot;TN&amp;quot;,&amp;quot;KG&amp;quot;,907.184996&lt;br /&gt;
&amp;quot;TN&amp;quot;,&amp;quot;LB&amp;quot;,2000&lt;br /&gt;
&amp;quot;M&amp;quot;,&amp;quot;FT&amp;quot;,3.28084&lt;br /&gt;
&amp;quot;OZ&amp;quot;,&amp;quot;ML&amp;quot;,29.573529&lt;br /&gt;
&amp;quot;GL&amp;quot;,&amp;quot;L&amp;quot;,3.785412&lt;br /&gt;
&amp;quot;GL&amp;quot;,&amp;quot;OZ&amp;quot;,128&lt;br /&gt;
&amp;quot;L&amp;quot;,&amp;quot;OZ&amp;quot;,33.814021&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;/div&gt;</summary>
		<author><name>Intra&gt;User</name></author>
	</entry>
</feed>