Here the whole program with my routines (might have errors, but it worked for me) as I promised on SAX.
Code: CoordOff:GridOff:AxesOff
0->Xmin:1->DeltaX
0->Ymin:1->DeltaY
SetUpEditor TIBN
If not(dim(|LTIBN:Then
" ->Str9
6->dim(|LTIBN
0->|LTIBN(1
1->|LTIBN(2
Else
UnArchive |LBNOTE:StoreGDB 1
1->Xmin:1->DeltaX:~63->Ymin:1->DeltaY
{48,49,50,51,51,51,50,49,48,47,46,45,45,45,46,47->L2:{~33,~33,~34,~35,~36,~37,~38,~39,~39,~39,~38,~37,~36,~35,~34,~33->L3
ClrDraw:For(G,2,4,2:Circle(48,~36,G,{[i]:End:Text(24,32,"Loading...
1->G:|LBNOTE->L1:"?->Str9
For(theta,1,dim(L1
For(Z,7,1,~1
int(100fPart(L1(theta)/10^(2Z
If Ans
Str9+sub("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyztheta :.?!',()[i]^/*-+0123456789=<>~[xhat]",Ans,1->Str9
Pt-Change(L2(G),L3(G
G+1-16(G=16->G
End
End
sub(Str9,2,length(Str9)-1->Str9
RecallGDB 1
End
UnArchive Str9
28->Z
While Z=28 or (A=12 and B=34 and K!=22
DelVar ZClrDraw
Horizontal 52
Horizontal 51
Text(~1,1,1,"BasicNote
StorePic 1
Text(~1,1,32,"Note
RecallPic 1
DelVar Pic1Line(38,4,38,50
Line(94,4,94,50
Line(0,4,0,50
For(A,51,3,~8
Horizontal A
End
Text(12,2,"NEW NOTE
Text(20,2,"DELETE
Text(28,2,"OPTIONS
DelVar C1->B
For(A,1,6)
If 6C+A<=|LTIBN(1
Then
Text(8A+4,40,sub(Str9,inString(Str9,"[xhat]T",B)+3,inString(Str9,"[xhat]N",B)-(3+inString(Str9,"[xhat]T",B
2+inString(Str9,"[xhat]E",B)->B
End:End
12->A:34->B
Repeat K=22 or Z=28 or (B=90 and |LTIBN(1)>=6C+A/4-F) or (A=12 and B=34
0->P
Repeat sum(K={22,105,23
1+int(A/8->F
1+iPart((|LTIBN(1)-1)/6
Text(3,87+4not(iPart(.1Ans)),Ans
Text(3,75+4not(iPart(.1(C+1))),C+1,"/
getKey->K
Text(A,B,"<
If K:Then
Text(A,B,"
If (K=34 and A=52 and |LTIBN(1)>6C+6) or (K=25 and B=90 and A=12 and C>0:Then
4(K=34)+60(K=25->A:C+(K=34)-(K=25->C:1->D
For(M,1,6C
2+inString(Str9,"[xhat]E",D->D
End
For(M,1,6
Text(8M+4,40,"
If |LTIBN(1)>=6C+M:Then
Text(8M+4,40,sub(Str9,inString(Str9,"[xhat]T",D)+3,inString(Str9,"[xhat]N",D)-(3+inString(Str9,"[xhat]T",D
2+inString(Str9,"[xhat]E",D)->D
End:End:End
A+8(K=34)(A<28)(B=34)-8(K=25)(A>12)+8(K=34)(B=90)(A<52)-(A-28)(K=24)(A>28->A
B+56((K=26)(B=34)-(K=24)(B=90->B
End
Text(A,B,"<
End
If K=105 or K=23:Then
StorePic 1
If B=34 or (K=23 and B=90 and |LTIBN(1)>=6C+A/4-F) or (B=90 and |LTIBN(1)>=6C+A/4-F:Then
If B=34 or (K=23 and B=90):Then
If A=12 and B=34:Then
Str9+"[xhat]T ->Str9
1+|LTIBN(1->|LTIBN(1
1->P
End
If A=20 or (K=23 and B=90):Then
Text(12,2,sub("DEL ALL DEL NOTE ",1+11(B=90),11
For(I,20,50,6
Text(I,1,"
End
Text(20,2,"CANCEL
Text(28,2,"CONFIRM
20->Z
Repeat K=105
Text(Z,34,"<
getKey->K
If Ans:Then
Text(Z,34,"
Z+8((K=34)(Z=20)-(K=25)(Z=28->Z
End:End
If Z=28:Then
If B=34:Then
" ->Str9:0->|LTIBN(1
End
If B=90:Then
34->B
inString(Str9,"[xhat]T"->D
For(I,1,6C+A/4-F-1
2+inString(Str9,"[xhat]E",D->D
End
If 6C+A/4-F=|LTIBN(1:Then
sub(Str9,1,D-1->Str9
Else
sub(Str9,1,D-1)+sub(Str9,inString(Str9,"[xhat]T",D+1),length(Str9)-(~1+inString(Str9,"[xhat]T",D+1->Str9
End
|LTIBN(1)-1->|LTIBN(1
End
Text(52,2,"DELETED
rand(30
End
If Z=20:Then
ClrDraw
RecallPic 1
End
34->B
End
If A=28:Then
For(I,12,58,8
Text(~1,I,0,"
End
Text(12,13,"ARCHIVE NOTES ON EXIT
Text(50,6,"UNARCHIVED FILES CAN BE
Text(56,11,"SUBJECT TO DELETION
Horizontal 13
For(G,45,45,~6
For(O,5,9
Line(O,G,O,G+4
End
End
DelVar K12->G
Line(6,47,7,46,0
Line(8,47,9,48,0
Repeat K=22
If K=105:Then
If G=12
not(|LTIBN(2->|LTIBN(2
For(O,6,8
Line(O,12-(G-46),O,12-(G-48),|LTIBN(2
End
Pt-On(9,12-(G-48
If |LTIBN(2:Then
Line(6,47,7,46,0
Line(8,47,9,48,0
End
End
Text(G,1,">
Repeat sum(Ans={22,25,34,105:getKey->K:End
Text(A,1,"
End
ClrDraw
RecallPic 1
End:End
DelVar K
If P or B=90:Then
inString(Str9,"[xhat]T->D
If P:|LTIBN(1)-1
If not(P:6C+A/4-F-1
For(E,1,Ans
2+inString(Str9,"[xhat]E",D->D
End
ClrDraw
Horizontal 55
DelVar XDelVar RDelVar SDelVar C
Text(0,69+4not(iPart(.1(C+1))),C+1
Text(0,77,"/87
Line(89,55,89,62
Line(67,55,67,62
If not(P:Then
Text(56,30,"Rendering..
sub(Str9,D+2,inString(Str9,"[xhat]N",D)-D-2->Str6
Text(0,1,Ans
sub(Str9,inString(Str9,"[xhat]N",D)+2,inString(Str9,"[xhat]E",D)-(2+inString(Str9,"[xhat]N",D->Str7
For(G,1,1+int((length(Str7)-3)/23
If G=9:Text(56,30,"
If length(Str7)>2:Then
23->theta
If length(Str7)<23G:length(Str7)-23(G-1->theta
For(O,1,8+int(3.87Ans),4
If theta=23 or 23(G-1)+(O-1)/4<length(Str7
sub(Str7,23G-20-2(O>5)+int(O/4)(23G-20-2(O>5)+int(O/4)<=length(Str7)),1
If Ans="
"
If O>5 and not(inString("wm",Ans)) and (theta=23 or 23(G-1)+(O-1)/4<length(Str7
Text(6G+2,O-8,Ans
If inString("wm",Ans:Then
Text(6G+2,O-8,sub("WM",inString("wm",Ans),1
Line(O,61-(6G+2),O+2,61-(6G+2),0
Pt-Off(O+1,60-(6G+2
End:End:End:End
Text(56,30,"
End
DelVar B8->A
Lbl TT
If P or K=11:Then
" ->Str7
" ->Str6
Repeat length(Str6)>1 and (K=34 or K=105
If 1=length(Str6
Text(0,1,"ENTER TITLE
Repeat Ans
getKey->K
End
Ans-20-5int(.1Ans
If 12>length(Str6) and 0<Ans and Ans<29 and K!=44 and K!=45:Then
If 1=length(Str6
Text(0,1,"
Str6+sub("ABC DEFGHIJKLMNOPQRSTUVWXYZ",Ans,1->Str6
End
If K=23 and length(Str6)>1:Then
sub(Str6,1,length(Str6)-1->Str6
Text(0,1,Str6+"
End
If K=45:Then
" ->Str6
Text(0,1,"
End
Text(0,1,Str6
End:End
If P
Str9+sub(Str6,2,length(Str6)-1)+"[xhat]N[xhat]E->Str9
If not(P
sub(Str9,1,D+2)+sub(Str6,2,length(Str6)-1)+sub(Str9,inString(Str9,"[xhat]N",D),length(Str9)+1-inString(Str9,"[xhat]N",D->Str9
0->P
Repeat K=22 or K=11
Repeat Ans
Line(B,61-A,B,57-A
getKey->K
Line(B,61-A,B,57-A,0
End
If Ans=21 or Ans=31:Then
If Ans=21:Then
DelVar Rnot(S->S
If S:Then
Text(0,91,"2
Else
Text(0,91,"
End:End
If Ans=31:Then
If not(R:3->R
DelVar SR-1->R
If R:Then
Text(0,91,"A
If R<2
Text(0,91,"a
Else
Text(0,91,"
End:End:End
If X and (not(S) or (S and not(sum(K={24,25,26,34:Then
For(theta,48,0,~6
Line(0,theta,94,theta,0
End
DelVar XDelVar M
End
If K>=41 and K<=104:Then
If R:sub("abc defghijklMnopqrstuvWxyztheta' :?ABC DEFGHIJKLMNOPQRSTUVWXYZtheta' :?",1+34(R-1),34
If S:" |E{}[e] [ ] [i]
If not(R) and not(S:"= ^ ,()/ 789plotdot 456->123+ 0.~
If " "!=sub(Ans,K-20-5int(.1K),1) or (K=102 and R
Then
sub(Ans,K-20-5int(.1K),1->Str8
If B>89 and A<54:DelVar BA+6->A
Text(A,B+1,"
Text(A,B+1,Str8
End
If R=1 and inString("WM",Str8
Then
Line(B+1,61-A,B+3,61-A,0
Pt-Off(B+2,60-A
sub("wm",inString("WM",Str8),1->Str8
End
23int(A/6-1)+B/4+2->theta
If Ans=length(Str7:Then
Str7+Str8->Str7
Else
sub(Str7,1,theta)+Str8
If theta+1<length(Str7
Ans+sub(Str7,theta+2,length(Str7)-theta-1
Ans->Str7
End
B+4->B:End
If sum(K={24,25,26,34:Then
If A>8 and K=24 and not(B:Then
92->B:A-6->A:End
If not(S:Then
B+4((K=26)(B<92)(length(Str7)>23int(A/6-1)+B/4+2)-(K=24)(B>0->B
A+6((K=34)(A<54)(length(Str7)>=23int(A/6)+1)-(K=25)(A>8->A
End
If B=92 and A<54 and K=26:DelVar BA+6->A
If K=34 and A<54 and 23int(A/6-(length(Str7)>23int(A/6-2)+(B-4(K-25))/4+1))+(B-4(K-25))/4+2>length(Str7:Then
If S:Line(B,62-A,94,62-A,M=sum(K={26,34
4((length(Str7)-2)-23int(length(Str7)/23->B
If S:Then
23int(A/6-1)+Ans/4+2->V
Line(0,56-A,B,56-A,M=sum(K={26,34
End:End
If S:Then
If (length(Str7)>23int(A/6-1)+B/4+2 and K=26) or (K=24 and (B and A=8) or (B!=92 and A=50) or A>8 and A<54:Then
If not(X:Then
sum(K={26,34->M:23int(A/6-1)+B/4+2->X
End
Line(B,62-A-6,B+4((K=26)-(K=24)),62-A-6,M=sum(K={26,34
B+4(K-25->B
23int(A/6-1)+Ans/4+2->V
If V=X
DelVar XDelVar M
End:End:End
If K=14 and X!=V
sub(Str9,1,1)+sub(Str7,min(X,V)+1,abs(X-V))+sub(Str9,2,length(Str9)-1->Str9
If sum(K={15,23:Then
If K=23:Then
23int(A/6)+B/4-21->theta
If not(X) and Ans!=length(Str7) or (X:Then
If not(X:Then
If Ans+1<length(Str7
sub(Str7,1,Ans)+sub(Str7,Ans+2,length(Str7)-Ans-1
If theta+1=length(Str7
sub(Str7,1,theta
End
If X:Then
If X>V
V+.01X->theta
If V>X
X+.01V->theta
If 100fPart(Ans)<length(Str7
sub(Str7,1,iPart(Ans))+sub(Str7,100fPart(Ans)+1,length(Str7)-100fPart(Ans
If 100fPart(theta)=length(Str7
sub(Str7,1,iPart(theta
DelVar XDelVar M
End:Ans->Str7
End:End
If K=15 and "[xhat]T"!=sub(Str9,2,2:Then
sub(Str7,1,23int(A/6)+B/4-21)+sub(Str9,2,inString(Str9,"[xhat]T")-2
If 23int(A/6)+B/4-21<length(Str7
Ans+sub(Str7,23int(A/6)+B/4-20,abs(23int(A/6)+B/4-21-length(Str7
Ans->Str7
End
For(G,int(A/6),1+int((length(Str7)-1)/23
Text(6G+2,(B+1)(G=int(A/6))+(G>int(A/6)),"
If length(Str7)>2:Then
23->theta
If length(Str7)<23G:length(Str7)-23(G-1->theta
For(O,(B+1)(G=int(A/6))+(G>int(A/6)),8+int(3.87Ans),4
If theta=23 or 23(G-1)+(O-1)/4<length(Str7
sub(Str7,23G-20-2(O>5)+int(O/4)(23G-20-2(O>5)+int(O/4)<=length(Str7)),1
If Ans="
"
If O>5 and not(inString("wm",Ans)) and (theta=23 or 23(G-1)+(O-1)/4<length(Str7
Text(6G+2,O-8,Ans
If inString("wm",Ans:Then
Text(6G+2,O-8,sub("WM",inString("wm",Ans),1
Line(O,61-(6G+2),O+2,61-(6G+2),0
Pt-Off(O+1,60-(6G+2
End:End:End:End
If 23int(A/6)+B/4-21>length(Str7:Then
2+6(1+int((length(Str7)-1)/23->A
4((length(Str7)-2)-23int(length(Str7)/23->B
End:End:End
If K=11:Goto TT
0->K
ClrDraw
sub(Str9,1,inString(Str9,"[xhat]N",D)+1)+Str7+sub(Str9,inString(Str9,"[xhat]E",D),length(Str9)+(1-inString(Str9,"[xhat]E",D->Str9
DelVar C12->A:34->B:2->F
End:End:End:End:End
If K!=22:Pause
1->Xmin:1->DeltaX:~63->Ymin:1->DeltaY
ClrDraw:For(G,2,4,2:Circle(48,~36,G,{[i]:End:Text(24,32,"Loading...
1->G:DelVar XDelVar Z0->dim(L1
For(theta,1,length(Str9
Z+1-7(Z=7->Z
If X(Z=1
X->L1(1+dim(L1
X-X(Z=1->X
100X+inString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyztheta :.?!',()[i]^/*-+0123456789=<>~[xhat]",sub(Str9,theta,1->X
Pt-Change(L2(G),L3(G
G+1-16(G=16->G
End
X->L1(1+dim(L1
L1->|LBNOTE
DelVar Pic1DelVar Str6DelVar Str7DelVar Str8DelVar Str9DelVar GDB1DelVar L2DelVar L3:ClrDraw
If |LTIBN(2:Archive |LBNOTE
Archive |LTIBN
ClrHome
Output(1,1,"