71B: DIM a variable, but keep the old value if it's already the right type?
|
03-23-2021, 08:19 AM
Post: #4
|
|||
|
|||
RE: 71B: DIM a variable, but keep the old value if it's already the right type?
To answer the question in the title: "DIM a variable, but keep the old value if it's already the right type?", I would also use the TYPE keyword as Valentin suggested but the Math ROM is required.
An other solution, w/o Math ROM: 10 ON ERROR GOTO 30 20 X=X @ GOTO 40 ! check that X is a scalar variable 30 REAL X ! declare X of the right type if needed 40 OFF ERROR J-F |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
71B: DIM a variable, but keep the old value if it's already the right type? - Dave Britten - 03-23-2021, 01:08 AM
RE: 71B: DIM a variable, but keep the old value if it's already the right type? - Joe Horn - 03-23-2021, 03:05 AM
RE: 71B: DIM a variable, but keep the old value if it's already the right type? - Valentin Albillo - 03-23-2021, 03:06 AM
RE: 71B: DIM a variable, but keep the old value if it's already the right type? - J-F Garnier - 03-23-2021 08:19 AM
RE: 71B: DIM a variable, but keep the old value if it's already the right type? - Dave Britten - 03-23-2021, 11:46 AM
RE: 71B: DIM a variable, but keep the old value if it's already the right type? - Valentin Albillo - 03-23-2021, 11:01 PM
|
User(s) browsing this thread: 1 Guest(s)