Difference between revisions of "Code Examples"

From GbdevWiki
Jump to: navigation, search
(Simple GBBasic 2.10 example)
(Simple GBBasic 2.10 example)
Line 10: Line 10:
 
60 next i
 
60 next i
 
70 end
 
70 end
 +
</pre>
 +
 +
== Simple GBDK example ==
 +
 +
<pre>
 +
 +
#include <gb/gb.h>
 +
#include <stdio.h>
 +
 +
void main()
 +
{
 +
printf("nHello World!");
 +
}
 +
 
</pre>
 
</pre>

Revision as of 20:28, 8 September 2010

Simple GBBasic 2.10 example

10 rem Simple example
20 for i=1 to 16
30 u=rnd(1)*16
40 print u
50 delay 20
60 next i
70 end

Simple GBDK example


#include <gb/gb.h>
#include <stdio.h>

void main()
{
printf("nHello World!");
}