RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic Goto page 1, 2, 3, 4  Next 
View previous topic - View next topic  
Author Message
I am Har har har
Slightly Deformed Faerie Princess


Joined: 08 Jan 2004
Posts: 33
Location: America.

PostPosted: Wed Feb 04, 2004 3:12 am    Post subject: Question: QB 45 [quote]

Why doesn't the statement Call Absolute work in QB 4.5? It would make some of my programming much faster if it did. I get the error that QB thinks the CALL ABSOLUTE command is a sub program that isn't defined in the beginning.
_________________
I do what I like. Do you have a problem with that?
Back to top  
Ninkazu
Demon Hunter


Joined: 08 Aug 2002
Posts: 945
Location: Location:

PostPosted: Wed Feb 04, 2004 3:25 am    Post subject: [quote]

You have to include the QB.QLB when loading QB.

Create a batch file or navigate to the containing directory with the command prompt and write: QB filename.bas /L [QB.QLB]

QB.QLB is in brackets, because you don't need it if it's just QB's library, but if you're including a different library, you must.
Back to top  
Bjorn
Demon Hunter


Joined: 29 May 2002
Posts: 1425
Location: Germany

PostPosted: Wed Feb 04, 2004 3:28 am    Post subject: [quote]

I was thinking he just wanted to "variable = ABS(variable)". This question turns out to be a whole lot more complicated. :-)
Back to top  
I am Har har har
Slightly Deformed Faerie Princess


Joined: 08 Jan 2004
Posts: 33
Location: America.

PostPosted: Wed Feb 04, 2004 2:11 pm    Post subject: [quote]

The statement is Call Absolute; a function that allows the use of machine code in QB. Completely different from ABS.
_________________
I do what I like. Do you have a problem with that?
Back to top  
valderman
Mage


Joined: 29 Aug 2002
Posts: 334
Location: Gothenburg, Sweden

PostPosted: Wed Feb 04, 2004 2:25 pm    Post subject: [quote]

You're coding in QBasic and you're concerned about the speed of your code? o_O

If your game/program requires any speed at all, you'd be a lot better off switching to C# or C++ - or at least Visual Basic.
_________________
http://www.weeaboo.se
Back to top  
I am Har har har
Slightly Deformed Faerie Princess


Joined: 08 Jan 2004
Posts: 33
Location: America.

PostPosted: Wed Feb 04, 2004 7:59 pm    Post subject: [quote]

Actually, Qbasic is a more powerful language than most realize. Anyone that was brought into programming with VB or one of C's many versions would think so at first glance, but Qbasic code can be optimized. By the way, I tried learning C++, but it's complicated to learn; that is, I'm not learning the way that I learned Qbasic because some weirdo named Deitel can't include graphics in his book.
_________________
I do what I like. Do you have a problem with that?
Back to top  
DrunkenCoder
Demon Hunter


Joined: 29 May 2002
Posts: 559

PostPosted: Wed Feb 04, 2004 10:13 pm    Post subject: [quote]

Everyone *knows* that graphics is imperative to learning any language and sound programming concepts.
_________________
If there's life after death there is no death, if there's no death we never live. | ENTP
Back to top  
valderman
Mage


Joined: 29 Aug 2002
Posts: 334
Location: Gothenburg, Sweden

PostPosted: Thu Feb 05, 2004 9:31 am    Post subject: [quote]

The reason he didn't include graphics *might* be because C++ has no built-in graphics support, and for a beginner to take on any graphics API would be mental suicide.
_________________
http://www.weeaboo.se
Back to top  
Bjorn
Demon Hunter


Joined: 29 May 2002
Posts: 1425
Location: Germany

PostPosted: Thu Feb 05, 2004 2:28 pm    Post subject: [quote]

I think I've stated it before, but I could only make the switch to C/C++ once I found out about Allegro. Without something cool to program like a noisy screen, tiled map or a particles effect, for me there was no fun in learning C when I tried it before. I also tried switching to Pascal but because it wasn't immediately obvious how to switch to a different graphic mode or load bitmaps, I never made it. The concept of libraries was quite new to me at the time, of course. In MSX BASIC and QB, everything I used was available at the language level.

A course on C++ should stil not include learning a graphics lib in my opinion though. I used an 21 days C++ course while making some examples programs using Allegro's functions, which felt amazingly similar to the standard QB functions. This way I learned both plain C++ knowledge and Allegro's functionality, and they were still easy to distinguish.
Back to top  
I am Har har har
Slightly Deformed Faerie Princess


Joined: 08 Jan 2004
Posts: 33
Location: America.

PostPosted: Sat Feb 07, 2004 2:48 am    Post subject: [quote]

Thanks for all of your advice. I'm opposed to using external libraries, because I like to write everything myself. That way, I know exactly what my code does. When I learn C++, I'm not going to and do not trust third party libraries. The bottom line: if C++ doesn't have a standard library for graphical applications, I'm going to learn 8086 assembly and build my own.
_________________
I do what I like. Do you have a problem with that?
Back to top  
LeoDraco
Demon Hunter


Joined: 24 Jun 2003
Posts: 584
Location: Riverside, South Cali

PostPosted: Sat Feb 07, 2004 3:34 am    Post subject: [quote]

I am Har har har wrote:
Thanks for all of your advice. I'm opposed to using external libraries, because I like to write everything myself. That way, I know exactly what my code does. When I learn C++, I'm not going to and do not trust third party libraries. The bottom line: if C++ doesn't have a standard library for graphical applications, I'm going to learn 8086 assembly and build my own.


That's a bit of a silly sentiment; the pure beauty of C/C++ is that the languages are not tied down to proprietary implementations. Regardless, there are several "standard" libraries (not in the canonical sense; ANSI/ISO C/C++ does not define such) for graphics apps: DX and GL are, practically, the most "standard"; there exist various flavor-wrappers that suit other's tastes. (I personally enjoy GLUT.)

Still, to refuse to learn a language simply because there are no standard graphics libs is just silly; especially considering the ubiquitousness of C/C++.
_________________
"...LeoDraco is a pompus git..." -- Mandrake
Back to top  
I am Har har har
Slightly Deformed Faerie Princess


Joined: 08 Jan 2004
Posts: 33
Location: America.

PostPosted: Sat Feb 07, 2004 7:15 am    Post subject: [quote]

Now, hold on a second; I didn't say I didn't want to learn C++. It's the fastest HLL out there! Who wouldn't want to? I tried learning it as my first PL, but the book "For Dummies" was of no help to me. I trashed it and went into Qbasic. Now, I have a different book, but it follows ansi C++. I'll learn it if I have to take it in college, but Assembly is the one I really want.
_________________
I do what I like. Do you have a problem with that?
Back to top  
LeoDraco
Demon Hunter


Joined: 24 Jun 2003
Posts: 584
Location: Riverside, South Cali

PostPosted: Sat Feb 07, 2004 9:31 am    Post subject: [quote]

I am Har har har wrote:
Now, hold on a second; I didn't say I didn't want to learn C++. It's the fastest HLL out there! Who wouldn't want to? I tried learning it as my first PL, but the book "For Dummies" was of no help to me. I trashed it and went into Qbasic. Now, I have a different book, but it follows ansi C++. I'll learn it if I have to take it in college, but Assembly is the one I really want.


C++ is fast because it's relatively close to the metal. (Well, C is (arguably) closer.) If you want to code on the metal these days, you might as well code in C (or in C++, if you want a level or two between you and your machine); while I wouldn't say that assembly is a useless learn, it wouldn't necessarily be easier than learning C++. Unless you decide to attend a shitty college that does everything in Java, you'll need to know C++ anyway. (which can be considered unfortunate, as there are many "cleaner" languages out there, that you can do some really funky things in. Although, the general trade-off is efficiency for quaintness. For instance, I'm currently in love with LISP and ML, which are wonderful functional programming languages, but lack really good state management mechanisms. (Read: they are there, but aren't necessarily used all the time.)) Also, if you have any plans on porting yourself to a Unix system (which, unless you select a shitty college, you'll more than likely have to), knowing C/C++ would definitely help (as the Unix/Linux kernerls are written in C).

The point? It is said, by those in hacker culture, that BASIC taints the would-be coder. While QB45 isn't nearly as bad as some of its cousins, it is certainly something one should avoid. You would be doing yourself a favor by giving your BASIC compiler (ha!) the boot, and picking up a language that offers you a bit more. If you are finding C++ a bit difficult to learn, you might be interested in picking up Python; while I don't use the language much, myself, it is rather cute, and quite powerful. (There is a least one champion of the language lurking around almost anywhere geeks cluster; you won't have trouble finding a mentor. Mandrake, I believe, is the local maester.) And, there is even a graphics lib that can be picked up (called PyGame). Python will take you places BASIC cannot take you (or could take you, but not as easily); knowing Python would also help in learning C++ (as you don't have to worry about memory management in Python, which makes things a bit easier).
_________________
"...LeoDraco is a pompus git..." -- Mandrake
Back to top  
Happy
JonA's American snack pack


Joined: 03 Aug 2002
Posts: 200

PostPosted: Sun Feb 08, 2004 10:09 am    Post subject: [quote]

LeoDraco wrote:
Unless you decide to attend a shitty college that does everything in Java, you'll need to know C++ anyway.


Actually, shitty colleges do everything in Visual Basic. I've looked around the area I'm in and all the colleges teach nothing but Visual Basic. Fie!
Back to top  
valderman
Mage


Joined: 29 Aug 2002
Posts: 334
Location: Gothenburg, Sweden

PostPosted: Sat Feb 14, 2004 6:48 pm    Post subject: [quote]

Trust me, assembly IS NOT the language you want to learn, and IF you absolutely have to learn it, go for MSIL ASM, and not x86 - at least if you want to be able to run your programs alright on the next version of Windows.
_________________
http://www.weeaboo.se
Back to top  
Post new topic Reply to topic Page 1 of 4 All times are GMT
Goto page 1, 2, 3, 4  Next 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum