Post Reply 
A program to toggle between prefixes
04-23-2016, 10:30 PM (This post was last modified: 04-23-2016 10:58 PM by StephenG1CMZ.)
Post: #6
RE: A program to toggle between prefixes
(04-23-2016 10:21 PM)salvomic Wrote:  
(04-23-2016 10:16 PM)StephenG1CMZ Wrote:  I can't see line numbers on my Android, but at a guess that is a long line...

maybe the error is about here
Code:

REPEAT

   OK:=CHOOSE(CHS,WDATAU(SL)+SG,DATATYPES(SL));
   IF OK THEN
    LBL:={WVALU(SL),WPREFIX(SL),DATATYPES(SL,CHS),"2^",WSOLVE(SL)};
    CASE
     IF CHS==1  THEN //CAPACITY
      OK:=INPUT({VALU,{PFX,PFXS},{QTYU,QTYTP},{USEBIN,1},{SLV,1}},TTL(1),LBL,HLP3​​(SL),1,1);
      IF OK THEN
       PFXNSTEP:=IFTE(USEBIN,2^10,10^3);
       PFXN:=IFTE(USEBIN,2^(10*(PFX-1)),1000^(PFX-1)); 
       IF SLV THEN //B=BPS*S
        VBITS:=VS*VBPS;
       ELSE
        VBITS:=VALU*PFXN*DATAS(QTYU);
       END;
       VALUES:=VBITS/{DATAS};
       MSGBOX(VALUES); 
       VALUES:=VALUES(1);//UNLIST?
       REPEAT 
        OKC:=CHOOSE(NC,"",QTYTP);
        IF OKC THEN       
         NUM:=VALUES(NC);
         ST:="";
         FOR II FROM  1 TO SIZE(PFXS) DO
          ST:=ST+(NUM/(PFXNSTEP^(II-1)))+PFXS(II)+QTYTP(NC)+NL;
         END;
         MSGBOX(ST); 
        END;
       UNTIL OKC==0;

      END;
     END;

I just checked it - there are about 6 lines that need changing.
All are spaces that shouldn't be there.
HLP3 (SL) should be HLP3(SL) (three lines, each with a differently positioned space)
a cre should be acre
1_ gal should be 1_gal
1_th erm should be 1_therm

When I download my version to Android, I see those extra spaces...
Hope it helps

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: A program to toggle between prefixes - StephenG1CMZ - 04-23-2016 10:30 PM



User(s) browsing this thread: 1 Guest(s)