Draw a pixel: Difference between revisions

Content added Content deleted
(Add Plain English)
m (BASIC256, BBC BASIC, and Commodore BASIC moved to the BASIC section.)
Line 637: Line 637:
}</syntaxhighlight>
}</syntaxhighlight>


=={{header|BASIC256}}==
=={{header|BASIC}}==
==={{header|BASIC256}}===
It seems that the program should be this. And the BASIC256 tutorial programs work on my ubuntu system. This program neither draws the pixel nor resizes the window. Can't see anything when I plot many spots. Oh well. I've tried the rgb(255,0,0) function as well as the fastgraphics/refresh statements.
It seems that the program should be this. And the BASIC256 tutorial programs work on my ubuntu system. This program neither draws the pixel nor resizes the window. Can't see anything when I plot many spots. Oh well. I've tried the rgb(255,0,0) function as well as the fastgraphics/refresh statements.
<syntaxhighlight lang="basic256">
<syntaxhighlight lang="basic256">
Line 647: Line 648:
</syntaxhighlight>
</syntaxhighlight>


=={{header|BBC BASIC}}==
==={{header|BBC BASIC}}===
{{works with|BBC BASIC for Windows}}
{{works with|BBC BASIC for Windows}}
<syntaxhighlight lang="bbcbasic"> VDU 23, 22, 320; 240; 8, 8, 8, 0, 18, 0, 1, 25, 69, 100; 100;</syntaxhighlight>
<syntaxhighlight lang="bbcbasic"> VDU 23, 22, 320; 240; 8, 8, 8, 0, 18, 0, 1, 25, 69, 100; 100;</syntaxhighlight>


=={{header|C}}==
==={{header|Commodore BASIC}}===
Requires the [http://www.cs.colorado.edu/~main/bgi/cs1300/ WinBGIm] library.
<syntaxhighlight lang="c">
#include<graphics.h>

int main()
{
initwindow(320,240,"Red Pixel");
putpixel(100,100,RED);
getch();
return 0;
}
</syntaxhighlight>

=={{header|Commodore BASIC}}==
The Commodore 8-bit machines only had 200 lines of vertical resolution (and the VIC-20 rarely used more than 160 of them for bitmap graphics), so these examples do not quite fit the task's 240-line requirement.
The Commodore 8-bit machines only had 200 lines of vertical resolution (and the VIC-20 rarely used more than 160 of them for bitmap graphics), so these examples do not quite fit the task's 240-line requirement.


Line 740: Line 724:
80 GETKEY K$:REM WAIT FOR KEYPRESS
80 GETKEY K$:REM WAIT FOR KEYPRESS
90 @TEXT:REM BACK TO TEXT MODE</syntaxhighlight>
90 @TEXT:REM BACK TO TEXT MODE</syntaxhighlight>

=={{header|C}}==
Requires the [http://www.cs.colorado.edu/~main/bgi/cs1300/ WinBGIm] library.
<syntaxhighlight lang="c">
#include<graphics.h>

int main()
{
initwindow(320,240,"Red Pixel");
putpixel(100,100,RED);
getch();
return 0;
}
</syntaxhighlight>


=={{header|Delphi}}==
=={{header|Delphi}}==