TIB: Re: 92+ dispG


[Prev][Next][Index][Thread]

TIB: Re: 92+ dispG




Try putting the DispG command _after_ Lbl z1

Also, after your If Key=340, 337, 338, and 344 commands, you can eliminate
the Then and EndIf statements so they read: (this is for optimization only)
...
:If Key=340
:zx(.5)
:
:If Key=337
:zx(2)
...
and so on

One final note:  Move your Defines to the top of the zoom() program, before
Lbl z1 and declare zx and zy Local variables.  Also add Local aa to both
Defined programs.

:zoom()
:Prgm
:Local zx,zy,key
:Define zx(aa)=Prgm
:Local aa
...<same as below>
:Define zy(aa)=Prgm
:Local aa
...<same as below>
:Lbl z1
:DispG

If anybody disagrees with these suggestions or has some of there own, feel
free to contribute.

-----Original Message-----
From: Matthew <mobets@flash.net>
To: TI Basic List <ti-basic@lists.ticalc.org>
Date: Monday, January 25, 1999 10:34 AM
Subject: TIB: 92+ dispG


>
>I am attempting to make a program that lets you easily zoom in/out and
other
>things on my 92+.  Unfortunately, it will not display the changes.
>xmin,xmax,xscl... are changing just fine.
>
>Could someone please tell me what is wrong with this.
>
>zoom()
>Prgm
>
>DispG
>
>Lbl z1
>
>getKey()»key
>If key=340 Then
>zx(.5)
>EndIf
>
>If key=337 Then
>zx(2)
>EndIf
>
>If key=338 Then
>zy(.5)
>EndIf
>
>If key=344 Then
>zy(2)
>EndIf
>
>If key=43 Then
>zy(.5)
>zx(.5)
>EndIf
>
>If key=45 Then
>zy(2)
>zx(2)
>EndIf
>
>If key=268 Then
>Toolbar
>Title "Built in"
>Item "ZoomData",zb1
>Item "ZoomDec",zb2
>Item "ZoomFit",zb3
>Item "ZoomInt",zb4
>Item "ZoomPrev",zb5
>Item "ZoomRcl",zb6
>Item "ZoomSqr",zb7
>Item "ZoomStd",zb8
>Item "ZoomSto",zb9
>Item "ZoomTrig",zb10
>EndTBar
>EndIf
>
>Lbl zb1
>ZoomData
>Goto z1
>
>Lbl zb2
>ZoomDec
>zx(5/2)
>zy(5/2)
>Goto z1
>
>Lbl zb3
>ZoomFit
>Goto z1
>
>Lbl zb4
>ZoomInt
>Goto z1
>
>Lbl zb5
>ZoomPrev
>Goto z1
>
>Lbl zb6
>ZoomRcl
>Goto z1
>
>Lbl zb7
>ZoomSqr
>Goto z1
>
>Lbl zb8
>ZoomStd
>Goto z1
>
>Lbl zb9
>ZoomSto
>Goto z1
>
>Lbl zb10
>ZoomTrig
>Goto z1
>
>If key=272 Then
>Stop
>EndIf
>
>If key0 Then
>ClrGraph
>DispG
>EndIf
>
>Goto z1
>
>Define zy(aa)=Prgm
>ymax*aa»ymax
>ymin*aa»ymin
>yscl*aa»yscl
>Return
>EndPrgm
>
>Define zx(aa)=Prgm
>xmax*aa»xmax
>xmin*aa»xmin
>xscl*aa»xscl
>Return
>EndPrgm
>
>
>EndPrgm
>_____________________________________________________
>You can e-mail me back at mailto:mobets@flash.net
>
>
>
>