Random question about OpenBOR

Smart Kitty

Well-known member
Hello everyone, I have been looking codes and I asked to myself.

Is currently OpenBOR scripts real javascript or it is just made with it and it's custom code? I know the file extension in OpenBOR is .c and not .js, but well I'm just curious about <3
 
OpenBOR does not involve Javascript. The syntax in .c or .h files for OpenBOR, is loosely based on the actual C language. It's a stripped-off version of C, with the syntax for the engine being simplified.

I'm not sure if I'm correct on this, so I will let anyone here to chime in on what it actually is.
 
Yesh I just realized when I was comparing my javascript old lines with a OpenBOR script, but well is good to know. Hmm, if it's currently C the scripts so I basically learnt C (the basics maybe)?
 
I found this example and seems similar to OpenBOR one.

Code:
#include <stdio.h>

int main() {
    int number;
    fputs("Enter an even integer: ", stdout);

    if (scanf("%d", &number) != 1) {
        fputs("Error: invalid number.\n", stderr);
        return -1;
    }

    for (int i = 2
; number % 2 == 0; ++i) {
        printf("%.3d| %d/2 = ", i, number);
        number /= 2;
        printf("%d\n", number);
    }

    printf("Cannot continue dividing: The number %d is odd.\n", number);
    getchar();

    return 0;
}
 
Back
Top Bottom