MyWiki:Reference desk/Archives/Computing/2021 October 23

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

This template must be substituted. Replace {{Archive header with {{subst:Archive header.

{| width = "100%"

|- ! colspan="3" align="center" | Computing desk |- ! width="20%" align="left" | < October 22 ! width="25%" align="center"|<< Sep | October | Nov >> ! width="20%" align="right" |Current desk > |}

Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


October 23

[edit source]

QBasic - bad token

[edit source]

I'm trying to run an old QBASIC program. I loaded the QBASIC interpreter. It gives me a "bad token" at position 51 on this line:

DEF FNday (y, m, d, h) = 367 * y - 7 * (y + (m + 9) \ 12) \ 4 + 275 * m \ 9 + d - 730531.5 + h / 24

That is the closing parentheses after the "+9". What is wrong? Bubba73 You talkin' to me? 17:35, 23 October 2021 (UTC)

Is the backslash the appropriate operator for division in QBasic, or should it be a forward slash? b:QBasic/Basic Math shows a forward slash in use.-gadfium 22:02, 23 October 2021 (UTC)
I see that backslash is for integer division. Is it possible that was only introduced in a later version of QBasic?-gadfium 22:06, 23 October 2021 (UTC)
The backslash is integer division. I downloaded QBasic from the Microsoft store today, so I thought that it would be a current version. But I see that there is a QB64 that may be more modern. I'll try that. Bubba73 You talkin' to me? 22:39, 23 October 2021 (UTC)

What sub-field in computer science deals with things like calling convention?

[edit source]

What CS discipline analyzes programming language aspects like: calling conventions, assigments, evaluation strategy and so on? That is, not only with the intention of teaching a concrete programming language, but to know what are the options, (dis)advantages, implications, and so on. --Bumptump (talk) 22:27, 23 October 2021 (UTC)

You may be looking for programming language theory: "a branch of computer science that deals with the design, implementation, analysis, characterization, and classification of ... programming languages." Hope this helps, RoxySaunders (talk · contribs) 01:10, 24 October 2021 (UTC)
Ermph, probably not PLT (programming language theory) per se, except for evaluation strategy. Otherwise that's the type of thing you would study in a compiler class, which is a software topic rather than a theory one, for the most part. You might look at the Red dragon book. 2602:24A:DE47:B8E0:1B43:29FD:A863:33CA (talk) 07:53, 25 October 2021 (UTC)