Page 2 of 4
Posted: Thu Oct 04, 2007 12:36 pm
by BasicGuy
C rocks! If it weren't for C, a whole lot of programming that we take for granted wouldn't even exist...
Pointers:
http://cslibrary.stanford.edu/106/
I have trouble thinking in C, but little organizing my thoughts in BASIC.
So did many others. Which was one of the primary reasons BASIC was created...

Posted: Thu Oct 04, 2007 1:27 pm
by Trond
It says it covers pointers "as they work in C and Pascal". As if they work the same in those languages. Pascal's pointers are much better than C's pointers.
Posted: Thu Oct 04, 2007 1:28 pm
by SoulReaper
[SOLVED]
I have programmed machine code in the early days which is important, Because theres no getting away from it then along came C, C++, forth and lisp, Pascal and interpreted basic then came Compiled Basics...
I believe that Pure Basic will be the language of the future...
Sure it needs some work, but its getting there and it can do inline assembly code - I dont think there is any limit to what Pure Basic Can DOOO!
waiting quietly for PB v999.999
C Sucks...
[SOLVED]
Posted: Thu Oct 04, 2007 1:44 pm
by blueznl
r_hyde wrote:
However, I will say that I prefer the ease of dereferencing using a single operator rather than PB's Peek/Poke functions. There has to be a way to make pointer usage both consistent and simple/wrist-friendly!
Well, one *could* use pointers, but that might be a bit cumbersome now and again (typing typing etc.)
GfaBasic had an interesting approach, instead of the classic Peek / Poke you could do something like:
Word( <memaddress> ) = <value>
I liked that format. Made things readable, but it's definitely not standard PB, I guess

Posted: Thu Oct 04, 2007 6:31 pm
by r_hyde
Trond wrote:But you don't need Peek/Poke. Just use a variable called *Pointer.LONG. *Pointer is the pointer and *Pointer\l is the value.
Wow, how'd I ever miss that? That'll sure come in handy!
Posted: Thu Oct 04, 2007 6:32 pm
by srod
r_hyde wrote:Trond wrote:But you don't need Peek/Poke. Just use a variable called *Pointer.LONG. *Pointer is the pointer and *Pointer\l is the value.
Wow, how'd I ever miss that? That'll sure come in handy!
And a damn site quicker than Peek and Poke !

Posted: Thu Oct 04, 2007 8:27 pm
by r_hyde
And a damn site quicker than Peek and Poke !
By quicker, did you mean quicker to type or faster to execute? Because a simple test shows them to be about equal in terms of run-time.
Posted: Thu Oct 04, 2007 8:29 pm
by BasicGuy
Pascal's pointers are much better than C's pointers.
Uh, ok..

Posted: Thu Oct 04, 2007 8:38 pm
by srod
r_hyde wrote:And a damn site quicker than Peek and Poke !
By quicker, did you mean quicker to type or faster to execute? Because a simple test shows them to be about equal in terms of run-time.
To execute.
Actually, that was a bit of an 'off the cuff' remark there by myself!

I seem to recall Fred saying that dreferencing a pointer was quicker than using Peek and Poke etc.
Posted: Thu Oct 04, 2007 8:49 pm
by Vin
C and C++ are still the languages of choice for system's applications (inc. OS development) and embedded systems.
Posted: Thu Oct 04, 2007 9:00 pm
by Irene
Vin wrote:C and C++ are still the languages of choice for system's applications (inc. OS development) and embedded systems.
Not only that but you can also code in C for any platform you like if GCC or something similar has been ported to it (GameCube's PowerPC Gekko CPU being a good example) ^o^
Posted: Thu Oct 04, 2007 9:10 pm
by Trond
Vin wrote:C and C++ are still the languages of choice for system's applications (inc. OS development) and embedded systems.
I wouldn't call it the language of "choice" because there's really no other choices if you want to do those things...

Posted: Thu Oct 04, 2007 9:15 pm
by Vin
[quote="Trond]I wouldn't call it the language of "choice" because there's really no other choices if you want to do those things...

[/quote]
Exactly! (With the exception of Assembly) I wish there were other choices. C++ can be unnecessarily complex.
I was just listening Scott Meyers (
http://www.aristeia.com/publications_frames.html) who is one of the world's foremost experts on C++. It is pretty much the only language he works with and even he states that's it's unnecessarily complex. BTW, I highly recommend his books for whoever is trying to learn it.
Posted: Thu Oct 04, 2007 9:16 pm
by Irene
Trond wrote:Vin wrote:C and C++ are still the languages of choice for system's applications (inc. OS development) and embedded systems.
I wouldn't call it the language of "choice" because there's really no other choices if you want to do those things... :)
Sure there are. Me and some friends (mostly guys if you're curious ^o^) ported GNU Fortran to the Nintendo GameCube way back in 2002 or so.. It wasn't pretty usable but we did get a fully functional SD card manager done to be used in conjuction with an SD Gecko. O_O
PS: Do I sound too geeky here? I hope not ^_^
Posted: Thu Oct 04, 2007 9:24 pm
by Vin
That sounds pretty cool, Irene, but...
Consider these things when labeling a language a systems development language: Can you create a bootable OS with it alone? Can you use it for Emedded Systems? Does it produce fast, small compact code that require minimal RAM and CPU usage? I'm not saying poorly written C++ can't take up all the RAM and CPU usage available but I am talking about ability. For example, C\C++ would be used for developing embedded systems (like a car computer or a cell phone) where RAM and CPU speed is highly limited. I wouldn't label Fortran as being able to fulfill all those needs. This doesn't mean a language can't be used for directly accessing hardware. PureBasic can do this.