What is the most efficient way to check for multiple statuses of a particular variable? I thought of:
DIM N%(1,5)
or something like that
i.e.
IF N%(1,1)=-1 THEN PRINT" That isn't valid here.":GOTO Beginning_Loop
IF N%(1,2)=-1 THEN PRINT" There is a magic spell blocking this object's effect.":GOTO Beginning_Loop
The reason I ask all this is I want to cut down on the size of many of my programs, which have some hardcoded routines, i.e.:
IF LOC%(N)=105 then ?"That object is wielded."
IF LOC%(N)=205 then ?"That object is worn."
I seem to be repeating similar lines of code. I want to cut down on that by at least a third or 1/4.
Thanks in advance for any replies. Finally, how to I circumvent the 64KB limit for strings in PB for DOS? I was thinking of using XMS and EMS, but I'm not too knowledgable about those two areas of MS-DOS programming.
I'm trying to convert Westfront PC into something GW-BASIC or QBASIC could handle. I'm using PBDOS to code it in.
Regards,
Dunric
[email protected]
ICQ#12234336
------------------
Few cats act their age, while
most just cough up furballs.
DIM N%(1,5)
or something like that
i.e.
IF N%(1,1)=-1 THEN PRINT" That isn't valid here.":GOTO Beginning_Loop
IF N%(1,2)=-1 THEN PRINT" There is a magic spell blocking this object's effect.":GOTO Beginning_Loop
The reason I ask all this is I want to cut down on the size of many of my programs, which have some hardcoded routines, i.e.:
IF LOC%(N)=105 then ?"That object is wielded."
IF LOC%(N)=205 then ?"That object is worn."
I seem to be repeating similar lines of code. I want to cut down on that by at least a third or 1/4.
Thanks in advance for any replies. Finally, how to I circumvent the 64KB limit for strings in PB for DOS? I was thinking of using XMS and EMS, but I'm not too knowledgable about those two areas of MS-DOS programming.
I'm trying to convert Westfront PC into something GW-BASIC or QBASIC could handle. I'm using PBDOS to code it in.
Regards,
Dunric
[email protected]
ICQ#12234336
------------------
Few cats act their age, while
most just cough up furballs.
Comment