home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1
/
HamRadio.cdr
/
ant
/
mininec3
/
mnpre.bas
< prev
next >
Wrap
BASIC Source File
|
1985-12-03
|
1KB
|
36 lines
10 REM $TITLE: 'IGNOMINI /E'
20 DEFINT I-N
30 MAXSEGS=75
40 ON ERROR GOTO 320
50 INPUT "NEC Dataset Name (.NEC)";F$:F$=F$+".NEC"
60 OPEN "MININEC.INP" AS #2 LEN=30
70 FIELD #2,2 AS S$,4 AS X1$,4 AS Y1$,4 AS Z1$,4 AS X2$,4 AS Y2$,4 AS Z2$,4 AS R$
80 PUT #2 'Dummy first record for no. of wires
90 OPEN F$ FOR INPUT AS #1
100 ON ERROR GOTO 0
110 IF EOF(1) THEN 300
120 LINE INPUT #1,L$
130 IF LEFT$(L$,2)<>"GW" THEN 110
132 PRINT L$
140 I=3-(MID$(L$,3,1)=","):J=INSTR(I,L$,",")
150 GOSUB 230:IX=X:LSET S$=MKI$(IX)
160 NSEGS=NSEGS+IX:IF NSEGS>MAXSEGS THEN 280
170 NWIRES=NWIRES+1
180 GOSUB 230:LSET X1$=MKS$(X):GOSUB 230:LSET Y1$=MKS$(X):GOSUB 230:LSET Z1$=MKS$(X)
190 GOSUB 230:LSET X2$=MKS$(X):GOSUB 230:LSET Y2$=MKS$(X):GOSUB 230:LSET Z2$=MKS$(X)
200 I=J+1:R=VAL(MID$(L$,I)):IF R>0 THEN LSET R$=MKS$(R) ELSE 290
210 PUT #2
220 GOTO 110
230 I=J+1:J=INSTR(I,L$,","):IF J THEN X=VAL(MID$(L$,I,J-I)):RETURN
240 PRINT"Not enough fields in this GW card."
250 CLOSE:KILL "MININEC.INP"
260 PRINT:PRINT"Any key for Initial Options"
270 WHILE INKEY$="":WEND:SYSTEM
280 PRINT"Segment limit exceeded ("MAXSEGS")":GOTO 250
290 PRINT"Wire radius must be positive number.":GOTO 250
300 LSET S$=MKI$(NWIRES):PUT #2,1
310 CLOSE:SYSTEM
320 PRINT F$" file not found. <Ctrl-Break> to exit.":PRINT
330 CLOSE:KILL "MININEC.INP"
340 RESUME 50