Repository of various works in text file format
Revision | 1122ba0b206431ad2d260189a329d60ed54eb288 (tree) |
---|---|
Time | 2018-02-20 07:16:26 |
Author | pierfrancesco A <pier4r4reich@yaho...> |
Commiter | pierfrancesco A |
improving data collection interface for the 50g and life gamification. Now I do not have to modify lists manually, that is quite error prone, I have a better interface to collect data. Though finding INFORML took a bit of time since the built in INFORM is pretty limited. It works well although not exactly efficient. Also expanded the user rpl language definition
@@ -0,0 +1,64 @@ | ||
1 | +<NotepadPlus> | |
2 | + <UserLang name="userrpl" ext="" udlVersion="2.1"> | |
3 | + <Settings> | |
4 | + <Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> | |
5 | + <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="yes" Keywords5="yes" Keywords6="no" Keywords7="no" Keywords8="no" /> | |
6 | + </Settings> | |
7 | + <KeywordLists> | |
8 | + <Keywords name="Comments">00@ 01 02@ 03 04</Keywords> | |
9 | + <Keywords name="Numbers, prefix1"></Keywords> | |
10 | + <Keywords name="Numbers, prefix2"></Keywords> | |
11 | + <Keywords name="Numbers, extras1"></Keywords> | |
12 | + <Keywords name="Numbers, extras2"></Keywords> | |
13 | + <Keywords name="Numbers, suffix1"></Keywords> | |
14 | + <Keywords name="Numbers, suffix2"></Keywords> | |
15 | + <Keywords name="Numbers, range"></Keywords> | |
16 | + <Keywords name="Operators1"></Keywords> | |
17 | + <Keywords name="Operators2"></Keywords> | |
18 | + <Keywords name="Folders in code1, open">\<<</Keywords> | |
19 | + <Keywords name="Folders in code1, middle"></Keywords> | |
20 | + <Keywords name="Folders in code1, close">\>></Keywords> | |
21 | + <Keywords name="Folders in code2, open"></Keywords> | |
22 | + <Keywords name="Folders in code2, middle"></Keywords> | |
23 | + <Keywords name="Folders in code2, close"></Keywords> | |
24 | + <Keywords name="Folders in comment, open"></Keywords> | |
25 | + <Keywords name="Folders in comment, middle"></Keywords> | |
26 | + <Keywords name="Folders in comment, close"></Keywords> | |
27 | + <Keywords name="Keywords1">DIR
END

IF
THEN
ELSE
IFT
IFTE

IFERR
DOERR
KILL
HALT

START
NEXT
FOR
STEP 
WHILE
REPEAT
UNTIL
DO

DOSUBS
NSUB
ENDSUB
DOLIST
STREAM
MAP

PICK
OVER
PICK3
UNPICK
ROLL
ROLLD
SWAP
DROP
DROP2
DROPN
DUP
DUP2
DUPDUP
DUPN
NDUPN
NIP
ROT
UNROT
DEPTH

PURGE
STO
STO+
STO-
STO*
STO/
RCL
PUSH
POP

TEVAL
TICKS
TIME
WAIT
KEY

EVAL

SF
FS?
CF
FC?
FS?C
FC?C

\->LIST
OBJ\->
\->TAG
TAG\->

CHR
\->STR
SREPL
\!^MATCH

REPL
SIZE
ADD
LSORT
SORT
GET
PUT
HEAD
TAIL
\GSLIST
\PILIST
\GDLIST
POS
REVLIST
SUB

LSORT
LPOP
LPUSH
LHDTL
MPOS
LROT
LSUM
LNDUP
NL\->I
LDDUP
LMRPT
DOPERM
DOCOMB
KSORT
LFRST
LLAST
AXL

ROW+
ROW-
COL+
COL-

%T
+
*
-
/
^
\v/
INV
RND
FLOOR
CEIL
R\->I
I\->R
ABS
RAND
MOD
ISPRIME?
FACTORS
NEXTPRIME
IP
FP

SIN
COS

LN
EXP
ALOG
LOG

DISP
INFORM
NOVAL
INLIST
INFORML

UPDIR
TVARS
TYPE</Keywords> | |
28 | + <Keywords name="Keywords2">\=/ 
\<= 
\>=
==
>
<
NOT
AND
OR
SAME</Keywords> | |
29 | + <Keywords name="Keywords3">\->
{
}
[
]
{}
[]</Keywords> | |
30 | + <Keywords name="Keywords4">lv
\<-lg
lp</Keywords> | |
31 | + <Keywords name="Keywords5">gv
gp
gd</Keywords> | |
32 | + <Keywords name="Keywords6">\PI
\pi</Keywords> | |
33 | + <Keywords name="Keywords7"></Keywords> | |
34 | + <Keywords name="Keywords8"></Keywords> | |
35 | + <Keywords name="Delimiters">00" 01 02" 03' 04 05' 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords> | |
36 | + </KeywordLists> | |
37 | + <Styles> | |
38 | + <WordsStyle name="DEFAULT" fgColor="80FF00" bgColor="000000" fontName="" fontStyle="0" nesting="0" /> | |
39 | + <WordsStyle name="COMMENTS" fgColor="C0C0C0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | |
40 | + <WordsStyle name="LINE COMMENTS" fgColor="C0C0C0" bgColor="000000" fontName="" fontStyle="0" nesting="0" /> | |
41 | + <WordsStyle name="NUMBERS" fgColor="FF8080" bgColor="000000" fontName="" fontStyle="0" nesting="0" /> | |
42 | + <WordsStyle name="KEYWORDS1" fgColor="8080FF" bgColor="000000" fontName="" fontStyle="0" nesting="0" /> | |
43 | + <WordsStyle name="KEYWORDS2" fgColor="FFFFFF" bgColor="8080FF" fontName="" fontStyle="0" nesting="0" /> | |
44 | + <WordsStyle name="KEYWORDS3" fgColor="FFFFFF" bgColor="FF8080" fontName="" fontStyle="0" nesting="0" /> | |
45 | + <WordsStyle name="KEYWORDS4" fgColor="80FFFF" bgColor="000000" fontName="" fontStyle="0" nesting="0" /> | |
46 | + <WordsStyle name="KEYWORDS5" fgColor="FFFF00" bgColor="000000" fontName="" fontStyle="0" nesting="0" /> | |
47 | + <WordsStyle name="KEYWORDS6" fgColor="EC0076" bgColor="000000" fontName="" fontStyle="0" nesting="0" /> | |
48 | + <WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | |
49 | + <WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | |
50 | + <WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | |
51 | + <WordsStyle name="FOLDER IN CODE1" fgColor="FFFFFF" bgColor="C0C0C0" fontName="" fontStyle="0" nesting="0" /> | |
52 | + <WordsStyle name="FOLDER IN CODE2" fgColor="FFFFFF" bgColor="000000" fontName="" fontStyle="0" nesting="0" /> | |
53 | + <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | |
54 | + <WordsStyle name="DELIMITERS1" fgColor="FF8040" bgColor="000000" fontName="" fontStyle="0" nesting="0" /> | |
55 | + <WordsStyle name="DELIMITERS2" fgColor="FF80FF" bgColor="000000" fontName="" fontStyle="0" nesting="0" /> | |
56 | + <WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | |
57 | + <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | |
58 | + <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | |
59 | + <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | |
60 | + <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | |
61 | + <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> | |
62 | + </Styles> | |
63 | + </UserLang> | |
64 | +</NotepadPlus> |
@@ -475,13 +475,9 @@ more floating ranges." | ||
475 | 475 | \>> |
476 | 476 | \>> |
477 | 477 | |
478 | - gpInformInput | |
478 | + gpInputFormTest1 | |
479 | 479 | \<< |
480 | - @Plan: to use Inform (that is not difficult) | |
481 | - @to input values at once and seeing an overview and then | |
482 | - @let the calculator modify the lists. | |
483 | - | |
484 | - "life gamification" | |
480 | + @options, they should be equal to the list of variables above. | |
485 | 481 | { |
486 | 482 | { "day" "" 0 } |
487 | 483 | @label day, no help, real wanted |
@@ -505,13 +501,101 @@ more floating ranges." | ||
505 | 501 | { "health" "" 0 } |
506 | 502 | { "weight" "" 0 } |
507 | 503 | { "ef. time" "" 0 } |
508 | - } | |
509 | - { 2 } @on two columns | |
510 | - { } @no reset | |
511 | - { } @no def value | |
512 | - INFORM | |
513 | - @inform return a list of value in order like labels | |
514 | - @and 1 if ok is pressed, 0 and no values if cancel is pressed. | |
504 | + } | |
505 | + @to consider whether to use manual definition or a loop | |
506 | + DROP | |
507 | + \>> | |
508 | + | |
509 | + gpInformInput | |
510 | + @uses informL and inlist, they have to be installed. | |
511 | + @ groups.google.com/forum/#!original/comp.sys.hp48/o4XwzdSzWhc/-TZrBqVzgcEJ | |
512 | + \<< | |
513 | + @Plan: to use Inform (that is not difficult) | |
514 | + @to input values at once and seeing an overview and then | |
515 | + @let the calculator modify the lists. | |
516 | + | |
517 | + @variable names as they are named on the calculator | |
518 | + { | |
519 | + 'DAY' 'MOOD' 'PROBSOLV' 'FEELSLIKEHOME' 'BALFOOD' 'PLANNING' 'REFLIMPROVE' 'SUGAR' | |
520 | + 'NOTEGOODBAD' 'RELAX' 'WRITE' 'LOGGING' 'WEATHER' 'NONTRIVIN' 'WATER' | |
521 | + 'SPORT' 'WORD' 'EXPENSES' 'HEALTH' 'WEIGHT' 'EFTIME' | |
522 | + } "lvListVarListNames" DROP | |
523 | + DUP SIZE "lvVarListSIZE" DROP | |
524 | + {} "lvResList" DROP | |
525 | + | |
526 | + \-> | |
527 | + @input | |
528 | + @var | |
529 | + lvListVarListNames | |
530 | + lvVarListSIZE | |
531 | + lvResList | |
532 | + | |
533 | + | |
534 | + \<< | |
535 | + @title | |
536 | + "life gamification" | |
537 | + @options, they should be equal to the list of variables above. | |
538 | + 1 lvVarListSIZE | |
539 | + FOR lvPos | |
540 | + @quick not so nice loop to build the list options | |
541 | + lvListVarListNames lvPos GET | |
542 | + \->STR | |
543 | + "'" "" SREPL DROP @drop the number of replacements | |
544 | + "" @the help | |
545 | + 0 @we want real numbers | |
546 | + 3 @elements in the list | |
547 | + \->LIST | |
548 | + NEXT | |
549 | + lvVarListSIZE \->LIST @building the option list | |
550 | + | |
551 | + { 1 } @columns | |
552 | + { } @no reset | |
553 | + { } @no def value | |
554 | + :2:INFORML EVAL | |
555 | + @inform / informL return a list of value in order like labels | |
556 | + @and 1 if ok is pressed, 0 and no values if cancel is pressed. | |
557 | + | |
558 | + IF | |
559 | + @now we continue unless the user canceled the inform. | |
560 | + @ 0 is canceled, 1 is ok. | |
561 | + @the result is already on the stack | |
562 | + NOT | |
563 | + THEN | |
564 | + @if we get a 0 (negated is 1) | |
565 | + @then we kill it. | |
566 | + KILL | |
567 | + END | |
568 | + | |
569 | + @otherwise we continue. | |
570 | + @save the list | |
571 | + 'lvResList' STO | |
572 | + | |
573 | + @we go through the values, we don't accept NOVAL for the moment. | |
574 | + IF | |
575 | + lvResList NOVAL POS | |
576 | + 0 > | |
577 | + THEN | |
578 | + lvResList | |
579 | + lvResList NOVAL POS | |
580 | + "NOVAL found in result list, please check data in L2 and L3" DOERR | |
581 | + END | |
582 | + | |
583 | + @if all the values are there, go for it! | |
584 | + 1 lvVarListSIZE | |
585 | + FOR lvPos | |
586 | + @quick not so nice loop to save the values | |
587 | + lvListVarListNames lvPos GET @we get the variable name | |
588 | + DUP @duplicate the name | |
589 | + RCL @recall the value | |
590 | + lvResList lvPos GET @the value to add | |
591 | + + @add | |
592 | + @stack situation | |
593 | + @L2: var name | |
594 | + @L1: updated list | |
595 | + SWAP @put the varname in L1 | |
596 | + STO @store the updated list in varname | |
597 | + NEXT | |
598 | + \>> | |
515 | 599 | \>> |
516 | 600 | |
517 | 601 | gdUtilities |