TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ALL
from: TIM HUTZLER
date: 1996-07-31 09:00:00
subject: UNION and ather trivia

Hi y'all;
I converted an application that used TYPE in conjunction with random
record access. This is a 'standard' way to parce fields. However when
I converted file access for sequential input, I ran into logistics
problems because the user (TYPE) structure generates a variable type
mismatch, ie. MyUserType = INPUT$(128,1)
By rewriting the data structure by removing the TYPE declarations and
changing each
 AS 
to...
 = MID$()
The fix was easy. However, using the MIM$ function much
slower than defining the user type.
It seems I should be able to use the UNION to overlap my user type
with a fixed lenght string, but I'm having trouble figuring out how to
get it to work. The example in the reference manual doesn't help.
Any comments or suggestions?
 
___ Blue Wave/QWK v2.12
--- Maximus/2 3.01
---------------
* Origin: Madman BBS * Chico, California * 916-893-8079 * (1:119/88)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.