Skip to main content
added 12 characters in body
Source Link
Steadybox
  • 16.5k
  • 5
  • 41
  • 84

QBasic

Here's my implementation in QBasic. The program must be called "JAQBH.BAS" in or for this to execute properly, as it reads its own source as part of the program. And I couldn't find any sane way of determining the name of the currently running script.

COMMON SHARED JAQBH$
COMMON SHARED F$
IF F$ = "" THEN F$ = "A.BAS"
OPEN F$ FOR OUTPUT AS #1
PRINT #1, JAQBH$
DATA 20,16,28,24,16
DATA "Just Another QBasic Hacker"
OPEN "JAQBH.BAS" FOR INPUT AS #2
FOR i% = 1 TO 5
        READ l%
        y$ = INPUT$(l%, #2)
        PRINT #1, y$
        y$ = INPUT$(2, #2)
NEXT
CLOSE #1
CLOSE #2
F$ = "CON"
READ JAQBH$
CHAIN "A.BAS"

Here's my implementation in QBasic. The program must be called "JAQBH.BAS" in or for this to execute properly, as it reads its own source as part of the program. And I couldn't find any sane way of determining the name of the currently running script.

COMMON SHARED JAQBH$
COMMON SHARED F$
IF F$ = "" THEN F$ = "A.BAS"
OPEN F$ FOR OUTPUT AS #1
PRINT #1, JAQBH$
DATA 20,16,28,24,16
DATA "Just Another QBasic Hacker"
OPEN "JAQBH.BAS" FOR INPUT AS #2
FOR i% = 1 TO 5
        READ l%
        y$ = INPUT$(l%, #2)
        PRINT #1, y$
        y$ = INPUT$(2, #2)
NEXT
CLOSE #1
CLOSE #2
F$ = "CON"
READ JAQBH$
CHAIN "A.BAS"

QBasic

Here's my implementation in QBasic. The program must be called "JAQBH.BAS" in or for this to execute properly, as it reads its own source as part of the program. And I couldn't find any sane way of determining the name of the currently running script.

COMMON SHARED JAQBH$
COMMON SHARED F$
IF F$ = "" THEN F$ = "A.BAS"
OPEN F$ FOR OUTPUT AS #1
PRINT #1, JAQBH$
DATA 20,16,28,24,16
DATA "Just Another QBasic Hacker"
OPEN "JAQBH.BAS" FOR INPUT AS #2
FOR i% = 1 TO 5
        READ l%
        y$ = INPUT$(l%, #2)
        PRINT #1, y$
        y$ = INPUT$(2, #2)
NEXT
CLOSE #1
CLOSE #2
F$ = "CON"
READ JAQBH$
CHAIN "A.BAS"
added 217 characters in body
Source Link
Kibbee
  • 959
  • 1
  • 6
  • 11

Here's my implementation in QBasic. The program must be called "JAQBH.BAS" in or for this to execute properly, as it reads its own source as part of the program. And I couldn't find any sane way of determining the name of the currently running script.

COMMON SHARED JAQBH$
COMMON SHARED F$
IF F$ = "" THEN F$ = "A.BAS"
OPEN F$ FOR OUTPUT AS #1
PRINT #1, JAQBH$
DATA 20,16,28,24,16
DATA "Just Another QBasic Hacker"
OPEN "JAQBH.BAS" FOR INPUT AS #2
FOR i% = 1 TO 5
        READ l%
        y$ = INPUT$(l%, #2)
        PRINT #1, y$
        y$ = INPUT$(2, #2)
NEXT
CLOSE #1
CLOSE #2
F$ = "CON"
READ JAQBH$
CHAIN "A.BAS"

Here's my implementation in QBasic.

COMMON SHARED JAQBH$
COMMON SHARED F$
IF F$ = "" THEN F$ = "A.BAS"
OPEN F$ FOR OUTPUT AS #1
PRINT #1, JAQBH$
DATA 20,16,28,24,16
DATA "Just Another QBasic Hacker"
OPEN "JAQBH.BAS" FOR INPUT AS #2
FOR i% = 1 TO 5
        READ l%
        y$ = INPUT$(l%, #2)
        PRINT #1, y$
        y$ = INPUT$(2, #2)
NEXT
CLOSE #1
CLOSE #2
F$ = "CON"
READ JAQBH$
CHAIN "A.BAS"

Here's my implementation in QBasic. The program must be called "JAQBH.BAS" in or for this to execute properly, as it reads its own source as part of the program. And I couldn't find any sane way of determining the name of the currently running script.

COMMON SHARED JAQBH$
COMMON SHARED F$
IF F$ = "" THEN F$ = "A.BAS"
OPEN F$ FOR OUTPUT AS #1
PRINT #1, JAQBH$
DATA 20,16,28,24,16
DATA "Just Another QBasic Hacker"
OPEN "JAQBH.BAS" FOR INPUT AS #2
FOR i% = 1 TO 5
        READ l%
        y$ = INPUT$(l%, #2)
        PRINT #1, y$
        y$ = INPUT$(2, #2)
NEXT
CLOSE #1
CLOSE #2
F$ = "CON"
READ JAQBH$
CHAIN "A.BAS"
Source Link
Kibbee
  • 959
  • 1
  • 6
  • 11

Here's my implementation in QBasic.

COMMON SHARED JAQBH$
COMMON SHARED F$
IF F$ = "" THEN F$ = "A.BAS"
OPEN F$ FOR OUTPUT AS #1
PRINT #1, JAQBH$
DATA 20,16,28,24,16
DATA "Just Another QBasic Hacker"
OPEN "JAQBH.BAS" FOR INPUT AS #2
FOR i% = 1 TO 5
        READ l%
        y$ = INPUT$(l%, #2)
        PRINT #1, y$
        y$ = INPUT$(2, #2)
NEXT
CLOSE #1
CLOSE #2
F$ = "CON"
READ JAQBH$
CHAIN "A.BAS"