Post Reply 
Question about "User keyboard usage". Beta2 FW
11-22-2017, 08:42 PM (This post was last modified: 11-22-2017 08:45 PM by Tyann.)
Post: #6
RE: Question about "User keyboard usage". Beta2 FW
(11-22-2017 06:51 PM)Tyann Wrote:  
(11-21-2017 10:21 PM)dg1969 Wrote:  2) Where can we find, in the calculator menu, all the redefinitions realized in various programs?
There is no menu that summarizes the redefinitions

Bonjour

Cela doit être réalisable avec Programs et INSTRING.


Hello

This must be achievable with Programs and INSTRING.
[/quote]

Code:

CMID(s,n)
BEGIN
 IFTE(n>dim(s),"",mid(s,n));
END;
CINSTR(s,c,p)
//string,substring,position start
BEGIN
 LOCAL r;
 r:=INSTRING(CMID(s,p),c);
 IFTE(r>0,r+p−1,0);
END;

EXPORT CATK()
BEGIN
 LOCAL l,d,i,p,x,y,z,r:={};
 l:=Programs;d:=SIZE(l);
 FOR i FROM 1 TO d DO
  IF l(i)=="CATK" THEN CONTINUE; END;
  p:=Programs(i);z:=1;
  REPEAT 
   x:=CINSTR(p,"KEY K_",z);
   IF x THEN 
    y:=CINSTR(p,"END;",x)+3;
    r(0):=MID(p,x,y);
   END;
   z:=y; 
  UNTIL  NOT x; 
 END;
 EDITLIST(r,"USER",1);
END;

Un premier jet à améliorer.
CMID et CINSTR sont issus de ma STRlibrary.
Nommer le programme 'CATK'

A first throw to improve.
CMID and CINSTR are from my STRlibrary.
Name the program 'CATK'

Sorry for my english
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Question about "User keyboard usage". Beta2 FW - Tyann - 11-22-2017 08:42 PM



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