PageMac
Home
   dot Projects
   dot Pics and Images
   dot WREK
D++
   dot About / FAQ
   dot Download
   dot Code Library
   dot Documentation
   dot VB6 Runtime Files
About

Commands

The following are all of the built-in D++ commands which you can use to construct your D++ applications. All arguments are evaluated, except when a variable is invloved (such as with screenin).

Back to Documentation Index


screenput
screenout
screenin
screenpass
screen;
newvar
resize
title
box
winsock
call
return
delete
pause
open
web
wav
exit_do;
exit_for;
continue;
clear;
clearlast;
hide;
show;
exit_function;
return
hide_controls;
show_controls;
disable_cad;
enable_cad;
cancel_input;
open_cd;
close_cd;
doevents;
end;
finish;
pak;


screenput string;

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


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 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 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;

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 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 [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 string;

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


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.

name;

winsock

Declares a new winsock instance. Please note that winsocks are global in D++, no matter which function you declare them in. For more information on winsock, visit this page.


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 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 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 interval;

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


open file;

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


web url;

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


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;

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;

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


continue;

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


clear;

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


clearlast;

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


hide;

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


show;

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


exit_function;

Exits the current function without further code execution.


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;

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


show_controls;

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


disable_cad;

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


enable_cad;

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


cancel_input;

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


open_cd;

Opens the primary CD-ROM drive.


close_cd;

Closes the primary CD-ROM drive.


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;

Ends the program at it's current state.


finish;

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


pak;

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