0 Members and 3 Guests are viewing this topic.
dim(1,40 ; Disables Indicator (dim(1)) and Turns Basic ReCode on ((dim(40)). In BatLib, we can have multiple commands in a single dim(Fill(0 ; AxesOff, ClrDraw, basically, it cleans the screen in a Recode BlockWhile getKey≠15 ; waits till a [CLEAR] pressLine(0,96,0,64,6 ; Draws a rectangle, X=0, WIDTH=96,Y=0;HEIGHT=64;TYPE=6. Type 6 is borders onlyDispGraph ; Displays the graphscreenEnd ; End of loopStop ; Disables ReCode and goes back to BASICAxesOn ; Turns Axes on
While getKey!=45 ; "!=" is the difference symboldim(1,29,0,96,0,64,6,99EndClrDraw:ClrHome
dim(1 ;Disables Indicatordim(29,0,96,0,64,6 ;Creates a rectangle of type (6) borders only at (0,0)dim(99 ;DispGraph
dim(29,B,8,C,8,2dim(99 ;Displays the inverted rectangledim(10,3 ;waits until Arrows or the column with enter to be presseddim(43→A ;returns the key in Ans and is stored to Adim(29,B,8,C,8,2 ;This reinverts the rectangle, but it isn't shown yet. Great for smooth graphics.
I still don't understand how the chaining works; my brain doesn't comprehend the awesome. What if you leave arguments out of a command? How does it know to go on to the next command?
:dim(40:Fill(0:Stop:6→D:DelVar B0→C:Repeat A=15:dim(29,B,8,C,8,2,99,10,3,43,29,B,8,C,8,2→A:max(0,min(88,B+Dsum(DeltaList(A={2,3→B:max(0,min(56,C+Dsum(DeltaList(A={4,1→C:End
Yeah, I just needed to show that the cursor doesn't change what is underneath it
dim(40Fill(0 ;Inside ReCode blocks, this clears the screen, turns axes offStop6->DDelVar B0->CLbl YRepeat A=15 ;Will loop until pressing [CLEAR]If getKey=105 ;GetKey for drawingThenGoto ZEnddim(29,B,8,C,8,2,99,10,3,43,29,B,8,C,8,2->Amax(0,min(88,B+Dsum(DeltaList(A={2,3->Bmax(0,min(56,C+Dsum(DeltaList(A={4,1->CEndReturnLbl Zdim(29,B,8,C,8,1 ;Draws RectangleGoto Y ;This goes back to beginning of loop
dim(1,56,46->DDelVar B0->CLbl YRepeat A=15 ;Will loop until pressing [CLEAR]If getKey=105 ;GetKey for drawingThenGoto ZEnddim(29,B,8,C,8,2,99,10,3,43,29,B,8,C,8,2->Amax(0,min(88,B+Dsum(DeltaList(A={2,3->Bmax(0,min(56,C+Dsum(DeltaList(A={4,1->CEndReturnLbl Zdim(29,B,8,C,8,1 ;Draws RectangleGoto Y ;This goes back to beginning of loop
dim(40Fill(03->D->E0->A->B->CWhile A!=15If A=9Line(B,D,C,E,1Line(B,D,C,E,2DispGraphgetKey->A=0DS<(1Line(B,D,C,E,2BIf A=3+1If A=2-1->BCIf A=1+1If A=4-1->CIf B>=990->BIf B=97-D96-D->BIf C=65-E64-E->CIf C>=990->CEndStop