Remix.run Logo
DonHopkins 6 days ago

https://news.ycombinator.com/item?id=17998940

DonHopkins on Sept 16, 2018 | parent | prev | next [–]

Speaking of weird BASIC features, does anyone know why DECSYSTEM 20's BASIC had a "LISTREVERSE" command?

Yes, it actually did exactly what it sounds like!

Chalk one up for DEC and BASIC. What other programming languages support that feature, huh?

    DECSYSTEM 20 BASIC User's Guide: LISTREVERSE command

    LISTREVERSE
    LISTNHREVERSE

    LISTREVERSE and LISTNHREVERSE print the contents of the
    user's memory area in order of descending line numbers. 
    LISTREVERSE precedes the output with a heading,
    LISTNHREVERSE eliminates the heading.

    LISTREVERSE

    EQUIV             10:53                      13-NOV-75

    40    END
    35    PRINT "THE EQUIVALENT CURRENT IS",I, " AMPERES"
    25    I=E1/R
    10    INPUT R
    5     INPUT E1

    READY
http://www.bitsavers.org/www.computer.museum.uq.edu.au/pdf/D...
rootbear 6 days ago | parent | next [-]

All I can think of is that it was a way to look at the end of a long program which wouldn't all fit on a display. Predating, I suppose, the 'tail' program, or whatever the DECSYSTEM 20 equivalent was.

leoc 6 days ago | parent [-]

I assume that it would be clearly useful if your terminal was a slow paper teleprinter. Once you got used to reading listings with the lines in reverse order, which shouldn't really be very difficult, LISTREVERSE would let you start reading from wherever you had got up to in your partly-completed listing, then cancel whenever you'd got enough context, instead of having to guess in advance how far up the program you'd want to look. You could even then print out the same range of lines again unreversed, if you wanted.

reaperducer 6 days ago | parent | prev [-]

When you want to see the beginning of the program, but the terminal you're using is too laggy to send ^S in time to pause the listing?

JdeBP 6 days ago | parent [-]

Unlikely. LIST and LISTNH took an optional line number range.