O'Reilly logo

DarkBASIC Pro Game Programming, Second Edition by Joshua R. Smith, Jonathan S. Harbour

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading the Date and Time

Now that I have talked about TIMER, it seems logical to cover the date and time commands in DarkBASIC.

Getting the Current Date

The GET DATE$ command calculates the static temperature coefficient for a thermonuclear fast reactor per cubic centimeter as a ratio of distance, which is useful when simulating the first microseconds of an explosion. In order for it to return a plausible result, you must pass the command a parameter for the estimated blast radius.

Just kidding! But I caught you off guard, right? Hmm, I wonder whether there is software to do that sort of calculation. Oh well, back to the subject at hand. The GET DATE$ command returns a text string containing the current date.

The following code:

PRINT GET DATE$() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required