examples or tutorial

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Ralf.

When i read about purebasic i thought it is compatible (at least a big part
of it) too QuickBasic with it´s syntaxes. But when i type in the famous
hello world program (print "Hello World") nothing happens except an
error message. Is there anywhere a tutorial for purebasic ?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Mr.Skunk.

There's the PB doc, and an example for each command in the PB disrib.
There's also an online doc here :
http://www.purebasic.com/documentation/index.html

For the "print" command that normal as QB uses a dos console and PB uses Windows.

The "hello world" in PB is like this:

InitWindow(0)
If OpenWindow(0, 400, 400, 200,100, #PB_Window_SystemMenu ,"Simple program")
drawingoutput(windowid())
locate(20,20):drawtext("Hello World")
stopdrawing()

Repeat
ev.l=WaitWindowEvent()
Until ev.l=#PB_EventCloseWindow
EndIf
Read the PB doc, and you'll see it's not difficult at all to use it.
And if you've problems, fell free to ask here...

Edited by - mr.skunk on 16 July 2001 17:32:57
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Ralf.
There's the PB doc, and an example for each command in the PB disrib.
There's also an online doc here :
http://www.purebasic.com/documentation/index.html

For the "print" command that normal as QB uses a dos console and PB uses Windows.

The "hello world" in PB is like this:

InitWindow(0)
If OpenWindow(0, 400, 400, 200,100, #PB_Window_SystemMenu ,"Simple program")
drawingoutput(windowid())
locate(20,20):drawtext("Hello World")
stopdrawing()

Repeat
ev.l=WaitWindowEvent()
Until ev.l=#PB_EventCloseWindow
EndIf
Read the PB doc, and you'll see it's not difficult at all to use it.
And if you've problems, fell free to ask here...

Edited by - mr.skunk on 16 July 2001 17:32:57
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Mr.Skunk.

Forgot your message???

Mr Skunk

Mr Skunk's PureBasic Web Page
http://www.skunknet.fr.st
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.
There's the PB doc, and an example for each command in the PB disrib.
There's also an online doc here :
http://www.purebasic.com/documentation/index.html

For the "print" command that normal as QB uses a dos console and PB uses Windows.

The "hello world" in PB is like this:

InitWindow(0)
If OpenWindow(0, 400, 400, 200,100, #PB_Window_SystemMenu ,"Simple program")
drawingoutput(windowid())
locate(20,20):drawtext("Hello World")
stopdrawing()

Repeat
ev.l=WaitWindowEvent()
Until ev.l=#PB_EventCloseWindow
EndIf
Read the PB doc, and you'll see it's not difficult at all to use it.
And if you've problems, fell free to ask here...

Edited by - mr.skunk on 16 July 2001 17:32:57
Hum, this one is bit hard for a beginner. Try this one Ralf:

MessageRequester("Info", "hello World", 0)

Bye,

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Mr.Skunk.

Sorry, Ralf and Fred, it's true, i've not been very simple
I would be careful with my examples in the future...


Edited by - mr.skunk on 17 July 2001 01:52:14
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Ralf.


Thanks a lot FRED and Mr. SKUNK!

So PureBasic has not much in common with QBASIC, i guess.


Sorry, Ralf and Fred, it's true, i've not been very simple
I would be careful with my examples in the future...


Edited by - mr.skunk on 17 July 2001 01:52:14
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Mr.Skunk.

Not much, but try it, it's very powerfull and not very complicated...


Edited by - mr.skunk on 19 July 2001 05:54:52
Post Reply