[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2008-12-30T18:40:48-05:00 http://petesqbsite.com/phpBB3/app.php/feed/topic/2775 2008-12-30T18:40:48-05:00 2008-12-30T18:40:48-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=18591#p18591 <![CDATA[Freebasic equivlants of QB code]]>
As for the original question, I think VB will continue winning, but FB and future independent freeware BASICS will always exist. People just like being free from big companies. Also, we enjoy figuring things out for ourselves instead of just using prebuilt libraries and functions. The pros will use VB, the C's, and Java, but hobbyists will still use free lower-level languages.

Statistics: Posted by technoweasel — Tue Dec 30, 2008 6:40 pm


]]>
2008-10-05T04:44:47-05:00 2008-10-05T04:44:47-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=17995#p17995 <![CDATA[Freebasic equivlants of QB code]]> FBEdit has the FB Help file attached.

As to arrays in subs and functions:
You can seend them just like you did in QB if my memory serves.

Code:

Declare Sub ArraySub(myInt() as Integer)Sub ArraySub(myInt() as Integer)   'array processing code hereEnd SubDim intArray(10) as integerArraySub(intArray())

Statistics: Posted by Imortis — Sun Oct 05, 2008 4:44 am


]]>
2008-10-04T21:07:33-05:00 2008-10-04T21:07:33-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=17993#p17993 <![CDATA[Thanks for helping]]>
I think alot of my problems might be solved with a good help function with examples.

I would like someone to make a nice example of the differences between normal arrays and pointer arrays.

Am I right? You can't send regular arrays into SUB's by themselves? you can only pass pointers?

Kiyote!

Statistics: Posted by Kiyotewolf — Sat Oct 04, 2008 9:07 pm


]]>
2008-10-04T21:02:00-05:00 2008-10-04T21:02:00-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=17992#p17992 <![CDATA[More on SUB and array usage]]>
I need an example of a program that either loads from a file into an array, then passes the array to the SUB or FUNCTION, (maybe an example of both), ..

Something like that.

Statistics: Posted by Kiyotewolf — Sat Oct 04, 2008 9:02 pm


]]>
2008-10-04T15:54:53-05:00 2008-10-04T15:54:53-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=17987#p17987 <![CDATA[Freebasic equivlants of QB code]]>

Code:

#include "fbgfx.bi"  'This includes the type info for fb.imageScreenres 640, 480, 32          'Set up 640*480 screen, 32 bppdim pPic as fb.Image ptr        'Points to picturepPic = imageCreate(10, 10)      'Set it upbload "Some picture.bmp", pPic  'Load from a bitmap fileput (4, 7), pPic, pset          'Put to screensleep                           'waitimageDestroy(pPic)end 
If you have ImageCreate to use in code, you will also have FB.Image datatype to work with.

Both of those were not available until 0.18 I think.

As to the [] that is only needed if you are using pointer arrays.

A regular array can be done just like in QB:

Code:

Dim myints(10) as integerDim mystrings(10) as String
And for subs, you can define the sub at the beginning or end of your code, but if you do it at the end, you have to DECLARE the sub at the top.
Like so:

Code:

Declare sub Add(x as integer, y as integer)'what ever code you like goes hereSub Add(x as integer, y as integer)     'whatever is in the subend sub
I'm not sure I know what you mean about the underscores...

I believe the IO stuff you were talking about is done through Get #/Put #, but I have never been able to try it.
Nothing to get data from.

Also, I thing that you are seeing all the advanced stuff that has been done in FB and mistaking it for the norm. This is far from true.

This code is valid in FB from very far back:

Code:

Dim As Integer x,y,xvel,yvel,rad,w,h,dScreenInfo(w,h,d) 'gets the width, height, and depth of current windows/linux screen resScreenRes w/2,h/2,d,2 x = 300y = 200xvel = 1yvel = 1rad = 25ScreenSet 0,1WindowTitle("Bouncing Ball")Circle(x,y), rad, RGB(255,0,0)Paint(x,y), RGB(255,0,0)DoclsIf x- rad <0>= w/2 Then xvel *= (-1)If y- rad <0>= h/2  Then yvel *= (-1)x += xvely += yvelCircle(x,y),rad,RGB(255,0,0)Paint(x,y), RGB(255,0,0)ScreenCopyLoop Until MultiKey(1) 'loops until escape key is pressed
If you would like one on one help, you can always email me, or IM me. I am more than willing to help out in anyway I can.

Statistics: Posted by Imortis — Sat Oct 04, 2008 3:54 pm


]]>
2008-10-04T09:44:59-05:00 2008-10-04T09:44:59-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=17985#p17985 <![CDATA[Freebasic equivlants of QB code]]>

Code:

Screenres 640, 480, 32          'Set up 640*480 screen, 32 bppdim pPic as uinteger ptr        'Points to picturepPic = imageCreate(10, 10)      'Set it upbload "Some picture.bmp", pPic  'Load from a bitmap fileput (4, 7), pPic, pset          'Put to screensleep                           'waitimageDestroy(pPic)end

Statistics: Posted by Mentat — Sat Oct 04, 2008 9:44 am


]]>
2008-10-04T03:52:41-05:00 2008-10-04T03:52:41-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=17984#p17984 <![CDATA[Forgot something..]]>
If I'm going to program in a new language, that is obviously a lemon sitting next to an orange, QB to FB, I don't wanna limp around with a half working QB emulation, ... I want the real thing!!

...


Thanks!

Kiyote!

Statistics: Posted by Kiyotewolf — Sat Oct 04, 2008 3:52 am


]]>
2008-10-04T03:48:39-05:00 2008-10-04T03:48:39-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=17983#p17983 <![CDATA[Freebasic equivlants of QB code]]>
I am starting to grasp the ins and outs of game programming in VB, but I would like to take a whack at FB, but I need some dumbing down of the new ways of doing things first.

Example program

DECLARE SUB DrawSprite(x,y,Spr())

SCREEN 13
redim Spr(10,10)
get(0,0)-(9,9),Spr
DrawSprite 3,4,Spr()
END

SUB DrawSprite (x,y,Spr())
PUT (x,y),Spr()
END SUB

.........

Ok, there is an array there being used by the SUB, and I know that there is not ""real array support in the sense of looking like QB code, but instead there are pointers,..

I would like examples of how to handle arrays that are both numeric and string based.

Also, what is this [ ] in the array? I have also seen the familiar ( ) when referencing arrays as well, and etc and etc, ..

Please dumb it down, and also, please don't put the code in some rigid fancy updated "" latest update of FB, version of the code, please make it in the sense of the earlier versions of FB so it looks like real code still, and would be most likely compatable on most all the updates of FB no matter what.

How do you guys handle non-image blocks of binary data file IO transfers between the memory and disk? GET and PUT file commands?

Also, why does there have to be all these little ___ underlines in the names of defined variable names when referencing high order DLL functions and crap??? Why do these FB programmers have to make the code look more and more like gibberish with each new update? Why can't we just make it simple!?? K.I.S.S.. Keep it simple Sam..

I also noticed, sometimes my SUB want to be defined at the beginning of the FB program, sometimes they like being on the end of the program, what is up with that and what is the proper right way to do it?

Examples of that using various IDE editors would be helpful.

I know this might be alot to ask for, and I am not sure if there are other posts on these subjects, but I don't have alot of time to surf the hundreds of posts between the short hours I have off around my work schedule.

Please help, ..

I've posted some stuff in the QB express mag, and I was hoping you guys could come to my rescue this time.

Thanks in advance for your time.

Notifying me of existing posts with links I wouldn't mind having either if that would be easier for some of you.

Kiyote!

Statistics: Posted by Kiyotewolf — Sat Oct 04, 2008 3:48 am


]]>