[Info-vax] ChatGPT - Joke about OpenVMS and Linux walking into a bar

Dave Froble davef at tsoft-inc.com
Sat Dec 31 22:24:03 EST 2022


On 12/31/2022 4:21 PM, Slo wrote:
> This is much better, beats reading the docs and googling for someone new to OpenVMS:
>
> 1. Code VAX C program to add the first 20 integers
> --------------------------------------------------------------------------------
> Here is a VAX C program that adds the first 20 integers:
> #include <stdio.h>
> int main() {
> int i;
> int sum = 0;
> // Loop through the first 20 integers and add them to the sum
> for (i = 1; i <= 20; i++) {
> sum += i;
> }
> // Print the result
> printf("The sum of the first 20 integers is: %d\n", sum);
> return 0;
> }
>
> 2. compile link and run
> ------------------------------------
>
> To compile, link, and run a VAX C program on OpenVMS, you can follow these steps:
>
>     Compile the program using the CC command. For example:
>     $ CC MYPROG.C
>
>     Link the program using the LINK command. For example:
>     $ LINK MYPROG, SYS$SHARE:VAXCRTL/OPT
>
>     Run the program by typing the name of the executable file. For example:
>     $ MYPROG
>
> Note: These steps assume that you have the necessary tools and libraries installed on
> your OpenVMS system. You may also need to specify additional options or libraries
> depending on your program's needs.
>

Maybe even easier in Basic ...

S = S + I For I = 1 to 20
Print S

Oh, wait, no Basic on x86, yet, ....

-- 
David Froble                       Tel: 724-529-0450
Dave Froble Enterprises, Inc.      E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA  15486



More information about the Info-vax mailing list