|
Post by Kkimm on Dec 28, 2004 1:27:16 GMT
Can someone please send me a list of the real basic (and I mean simple) commands that I would need to know to run a simple program. Please tell me what the commands mean. Thank you in advance.
Kim
|
|
|
Post by Ildûrest on Dec 29, 2004 3:07:25 GMT
Find a tutorial on the internet, or a book, or get a friend who will help you. There's a lot more to programming than just commands. If you give me your email address I could provide some help...
|
|
|
Post by mike420 on Mar 28, 2006 16:27:08 GMT
|
|
|
Post by Mikrondel on Mar 28, 2006 21:08:20 GMT
Sorry, that link is broken.
|
|
|
Post by earlofqb on Mar 29, 2006 1:19:46 GMT
Here's what the link should be: www.geocities.com/mikebess420He just accidentally added an extra dot (.). It's actually a good site, and I really wish I'd have seen the C++ and OOT sites. If it'll make you feel better, at least one person (other than yourself) is interested in learning OOT. I didn't spend 6 hours downloading it (and some pre-compiled stuff that I thought was source but didn't interpret the extension properly) to shelf it. I'd appreciate it if you could at least e-mail me the stuff about OOT from your site. C++ has been an attempted hobby of mine for a while now, but I can't seem to learn it "properly" (mainly because the examples I find online aren't geared with my compiler in mind, so I have to figure out what to change and how, resulting in a lot of problems). Of course, as Ildurest will eternally say, C owns (but I still contend that C# will own once people give it a chance). [ignore everything in brackets] [my name is] earl71972 [at] yahoo [dot] [ignore this stuff] com If you're not familiar with our e-mail stuff on here, it should suffice it to say this. Our site has been used as a harvestor for spam, so we now encode our addresses. You'll figure the rest out.
|
|
|
Post by Ildûrest on Mar 29, 2006 6:13:41 GMT
Whoops, I tried removing the dot and it didn't work. But now it does. <shrug>, either my mistake or server problems. Now, what kind of a reason is "due to the many differences in compilers and headers"? That's what I used to think until I began to really understand C. GNU C/C++ is the way to go, I reckon. Very easy to get, (free!, after all; comes with most Linux distributions, works on Windows too) and it's the choice compiler for the Open-Source community. Headers Schmeaders. POSIX is the standard of choice. You occasionally need a few extra lines for compatibility but in practice that's uncommon for all but graphical front ends and a few things here and there. Buuut from your QB tutorial I see that you're most probably not advanced enough yourself to write about C++. For one thing your INPUT A and INPUT A$ are the wrong way around. You also say 'the letter "A" can be replaced with any letter or word.' True enough, but to me that suggests that you aren't quite certain how variables work. Perhaps you'll find this informative: www.autopack.com/aleks/wiki/doku.php?id=tutorial(It's still in development; I plan to expand it and improve its structure soon) Maybe this will also help: qbasic.proboards6.com/index.cgi?board=general&action=display&n=1&thread=472
|
|
pixel
New Member
Posts: 2
|
Post by pixel on Oct 12, 2006 17:06:22 GMT
Can anyone tell me please, how to put coordinates and the origin at the center of the screen?
|
|
buff1
New Member
Posts: 3
|
Post by buff1 on Oct 12, 2006 22:27:03 GMT
Please be more specific. Screen mode, origin of what ?
In text mode, with a 80x24 screen the center will be approx 12,40 so, LOCATE 12,40 would put you at the approx center. I say approx because with even columns and lines the the actual center would be like column 40.5 and line 12.5 which is impossible . Even with pixels, the center will be approximate.
|
|
|
Post by Ildûrest on Oct 13, 2006 0:04:08 GMT
WINDOW SCREEN (-320, -240)-(319, 239)
Will set the origin to roughly the centre of the SCREEN 12 graphics screen.
If neither of these replies helped you, don't be surprised, because your question is very vague. Please give a more accurate description of what you want to do and how you're trying to do it in future so we can provide better help.
|
|
pixel
New Member
Posts: 2
|
Post by pixel on Oct 18, 2006 6:13:48 GMT
WINDOW SCREEN (-320, -240)-(319, 239) Will set the origin to roughly the centre of the SCREEN 12 graphics screen. If neither of these replies helped you, don't be surprised, because your question is very vague. Please give a more accurate description of what you want to do and how you're trying to do it in future so we can provide better help. Yes thank you. That was exactly what I wanted to know. Would you mind explaining how you derived those co-ords. Regards. lloyd
|
|
|
Post by Ildûrest on Oct 18, 2006 21:52:54 GMT
Well, SCREEN 12 is 640 pixels by 480, as can be discovered from the QB help files.
Half of 640 is 320, and half of 480 is 240.
However WINDOW SCREEN (-320, -240)-(320, 240) is not ideal because when we take the '0' row and column of pixels into account, we're actually asking for 641x481 pixels. So we just reduce the horizontal and vertical pixels each by 1, and get something like WINDOW SCREEN (-320, -240)-(319, 239)
Obviously, as there's an even number of pixels horizontally and vertically, there can be no "central" pixel, so I've picked one of the pixels bordering on the centre for each.
The method I've used ends up just shifting the pixels over; every integer in the correct range will still refer to a unique pixel. But you can also use something like WINDOW SCREEN (-1, -1)-(1, 1); in which case you will need to use fractional values between -1 and 1 to refer to the pixels.
One other thing to note if you might decide to use this; most screen modes are exactly 4x3 in their pixel ratios.
And as a final comment: an alternative is to simply subtract 320 or 240 from each absolute pixel value you wish to use; or multiply them by something, etc.. This may be a touch faster.
|
|