Local variables on TI92+
[Prev][Next][Index][Thread]
Local variables on TI92+
-
To: CALC-TI@LISTS.PPP.TI.COM
-
Subject: Local variables on TI92+
-
From: "Miroslaw J. Wiechowski" <mjw@BAHNHOF.SE>
-
Date: Tue, 15 Dec 1998 23:44:39 +0100
-
Organization: Kolejarska Spoldzielnia Pracy 'Zator'Disapproved-by: Swiatowy Zwiazek Walki o Postemp i Tolerancje
-
Reply-To: "Miroslaw J. Wiechowski" <mjw@BAHNHOF.SE>
I noticed a rather strange behaviour of local variables in
TI92 Basic. I mean strange because being a programmer I have
never encountered something like this before.
Let's assume we have the following program skeleton:
mainprog()
Prgm
Local avar @ a variable local to maiprog
Local subproc @ a local subroutine
Define subproc(x) = Prgm @ here we actually define the
... blah... blah... @ subroutine
Disp avar @ we display the variable avar
EndPrgm
... blah... blah ..
EndPrgm
The variable 'avar' used in 'subproc' is NOT the 'avar'
defined in the 'mainprog' - contrary to what you would
expect from a language allowing nested subprogram
definitions!
Correct me if I am mistaken.
Regards
mjw
Follow-Ups: