Site Tools


dpp:docs_commands

D++ Commands

D++ command statements can be used in any function code.

Back to D++ Documentation Index

screenput

screenput string;

Prints text to the screen. This is the primary output command which you should use to display text.

screenout

screenout string;

Prints text to the screen one character at a time, for effect. This command is usually only used for displaying text in a fancy way.

screenin

screenin variable;

Waits for input from the user. When this command is used, D++ will wait for the user to enter text into the console. This text is then stored in variable. Can be canceled with the cancel_input command.

screenpass

screenpass variable;

Waits for input from the user, in the same way the screenin function works. However, the input is masked so that only asteriks (*) appear when the user enters text. Value is stored normally into variable.

screen

screen;

Prints a carriage return (char 10) + line feed (char 13), or goes to a new line. This is the same as VB's vbCrLf or D++'s dpp.crlf.

newvar

newvar variable;

Declares a new variable. Variables in D++ are all of a uniform type, so no type specifier is needed. Arrays can also be declared by adding brackets, [], to the end of the variable. For more information on variables, visit this page.

resize

resize [preserve] variable, size;

Resizes an array to the specified size. This command is similar to VB's ReDim statement. For more information on arrays, visit this page.

title

title string;

Titles the application's tool bar and process name to the specified value.

box

box message [, title ];

Displays a message box. Optionally, you can add a second value which will be used as the message box's title. Sorry - you can't change the type of message box.

winsock

winsock name;

Declares a new winsock instance. Please note that winsock objects are global in D++, no matter which function you declare them in. Click here for more information on winsock.

call

call function;

Calls the specified function. All return values of the function will be ignored. This command is no longer required as of version 4.0, as you can simply write the function and D++ will execute it.

return

return value;

Sets the current functions return value, then exits the function. This is the same as writing “function = value;”, except it exits the function.

delete

delete file;

Deletes the specified file. If the file specified does not exist, a run-time error will occure. It is recommended that you use the FileExist function to make sure the file eixsts before trying to delete it.

pause

pause interval;

Pauses program execution for the specified interval. The interval is in seconds, but you can use decimal values.

open

open file;

Launches the specified file, using the ShellExecute API. If the file does not exist, no error is flagged.

web

web url;

Launches the web browser and navigates to the specified URL, using the ShellExecute API.

wav

wav file;

Plays the specified wav file using the PlaySound API. If the file does not exist, an error message is displayed, but program execution will continue.

exit_do

exit_do;

Exits the current Do Until or Do While loop. If not in a loop, it will simply look for the next appropriate “loop” statement. If this does not exist, an error will occure.

exit_for

exit_for;

Exits the current For loop. If not in a loop, an error will occure.

continue

continue;

Exits the current loop and re-evaluates the expression (similar to the loop statement).

clear

clear;

Clears the current console text. This will only work in normal console mode.

clearlast

clearlast;

Clears the last statement printed to the screen using the screenput or screenout function.

hide

hide;

Hides the D++ console window. This will only work in normal console mode.

show

show;

Shows the D++ console window. This will only work in normal console mode.

exit_function

exit_function;

Exits the current function without further code execution.

return

return [value];

Assigns the current function the given value, then exits the function. If a value is not given, the function will simply exit.

hide_controls

hide_controls;

Hides the minimize and close buttons on the D++ console. This will only work in normal console mode.

show_controls

show_controls;

Shows the minimize and close buttons on the D++ console. This will only work in normal console mode.

disable_cad

disable_cad;

Disables Control-Alt-Delete. This will only work in Windows 95/98/ME.

enable_cad

enable_cad;

Enables Control-Alt-Delete. This will only work in Windows 95/98/ME.

cancel_input

cancel_input;

Cancels the last input function called, either screenin or screenpass. The value returned to the variable is null.

open_cd

open_cd;

Opens the primary CD-ROM drive.

close_cd

close_cd;

Closes the primary CD-ROM drive.

doevents

doevents;

Gives time for Windows to do other background processes, i.e. update the GUI. Recommended when doing long loops, to prevent the application from crashing. Similar to the DoEvents function in VB.

end

end;

Ends the program at it's current state.

finish

finish;

Stops execution of code, but the program will remain open.

pak

pak;

Displays the message “Press Any Key to Continue…” and halts execution until the user presses a key.

Back to D++ Documentation Index

dpp/docs_commands.txt · Last modified: 2015-07-30 13:45 by daniel