Thank you, Bruce, however, the A=B=C construct is exactly what I was trying to do.
Again, thank you Bruce, and everyone else who contributed.
Ray S.
-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On Behalf Of Robert Collins
Sent: Thursday, August 17, 2006 7:47 AM
To: [log in to unmask]
Subject: Re: [HP3000-L] Business BASIC question
Hey Ray,
From my technical folks:
You do the ability to define areas by offset and length and to assign multiple values to the same memory; however, the results are stored in a different memory location. So a true redefinition in the Cobol sense does not take place.
For example
In COBOL, if A redefines B which redfines C, then A=B=C. If C is changed, then A & B both are changed since the same memory is referenced.
But in Basic IF A=B AND B=C then A=B=C is not true, since A,B & C occupy different memory.
* 10 DIM A$[20], B$[10], C$[10]
* 20 A$="ABCDEFGHIJKLMNOPQRTU"
* 30 B$=A$[1,10] \ C$=A$[11,20]
* 40 print a$,b$,c$
* 50 a$="12345678901234567890"
* 60 print a$,b$,c$
* run
ABCDEFGHIJKLMNOPQRTUABCDEFGHIJKLMNOPQRTU
12345678901234567890ABCDEFGHIJKLMNOPQRTU
So, A, B and C are defined as strings and the value in A$ can be assigned to B$ and C$, but all still point to separate memory areas and, if A is given a different value, B and C aren't affected.
Robert Collins
U.S. Sales Consultant
Transoft
Part of Computer Software Group plc
1165 Northchase, Suite 375
Marietta, GA 30067
Phone #: 706-265-4110
Cell #: 770-789-1462
fax #: 706-265-1621
www.transoft.com www.computersoftware.com
-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On Behalf Of Ray Shahan
Sent: Wednesday, August 16, 2006 12:41 PM
To: [log in to unmask]
Subject: [HP3000-L] Business BASIC question
Hi all,
I've scoured the manual, but can't seem to locate this
concept (and it may be because it's not supported). In COBOL (and other
languages), one can REDEFINE a variables attributes, but I can't seem to
find any such concept for BB. Does anyone know if this can be done in
BB, and if yes, how to do it?
TIA,
Ray S.
<http://www.republictitle.com/>
Ray Shahan
Computer Programmer
REPUBLIC TITLE OF TEXAS, INC. <http://www.republictitle.com/>
2701 W Plano Parkway
<http://maps.yahoo.com/maps_result?addr=2701+w+plano+parkway&csz=75075&c
ountry=us&new=1&name=&qty=>
Plano, TX 75075
direct 214.556.0202
main 972.578.8611
fax 972.424.5621
www.republictitle.com <http://www.republictitle.com/>
[log in to unmask]
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|