• danA
    link
    fedilink
    arrow-up
    2
    ·
    12 hours ago

    of at least one dialect of BASIC that allowed subroutine calls to lack their parentheses

    Did sub calls normally have parentheses in BASIC?

    • palordrolap@fedia.io
      link
      fedilink
      arrow-up
      1
      ·
      12 hours ago

      Yes. Most early BASICs even required that any reference to a function name, in definition or calling, be preceded by an FN keyword as well as the parentheses.

      QBASIC, Visual BASIC and the related dialects of BASIC found in MS Office and LibreOffice all have slightly better syntax for defining and calling functions than the older BASICs, but they all still require parentheses on their subroutine parameter lists too.

      At best, you might be able to call a subroutine by name with no empty parentheses after it, but as soon as you need parameters, you’ll need parentheses around them.

      But like I say, there was at least one rare BASIC that didn’t need them, so I’m assuming there might have been others that I’m not aware of.

      • danA
        link
        fedilink
        arrow-up
        1
        ·
        5 hours ago

        Thanks for the info. I haven’t used BASIC in a very long time and can’t remember much about the syntax. Must be over 20 years ago now. I switched from VB6 to C# when .NET Framework 2.0 was released.