Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/01/11 19:20
Read: times


 
#180385 - Big difference in concept - C actually unusual
Responding to: ???'s previous message
Note that Pascal don't have pointer arithmetic.
And it doesn't make arrays look like pointers or pointers look like arrays.
And arrays have bounds checking.
And until Turbo Pascal, you didn't had a chance to play with pointer types.

There really is a huge difference with pointers in C compared to most other languages because of the freedom a developer has to manipulate them.

That is why some other languages are marked with the somewhat shady claim that they don't have pointers. They talk about references instead, but the basic difference is in how you are allowed to assign values to them and that you can't do arithmetic with them. But you still get null pointer exceptions, which is a very common failure for .NET and Java applications.

BASIC don't really need pointers in the normal sence since it has so different views of variables. Just as with references, you don't really see in the code if you access data directly or using a pointer. For most part, you normally get built-in functions that do hw-related actions. But some dialects have constructs to allow you to map your variables - needed in Visual Basic to allow access to some OS API or when interfacing with other languages.

C really is quite uncommon when it comes to pointers. That is a weaknes. But also one of the reasons why C works so well to map to traditional hardware. Traditional processor architectures has assembler instructions that are very much based on direct and indirect addressing modes, and the raw pointer implementation in C can make use of this.

List of 76 messages in thread
TopicAuthorDate
Partial decoding of external memory...            01/01/70 00:00      
   8 bit DATA Space            01/01/70 00:00      
      aka "PDATA"            01/01/70 00:00      
   Adres Latch            01/01/70 00:00      
      corrections to all the above replies            01/01/70 00:00      
         Partial decoding of external memory...            01/01/70 00:00      
            There are two locations in the LCD            01/01/70 00:00      
               Re: There are two locations in the LCD            01/01/70 00:00      
                  timing is the reason ...            01/01/70 00:00      
                     one fact expanded            01/01/70 00:00      
                     Thanks for the advice...            01/01/70 00:00      
                        still?            01/01/70 00:00      
                        Maybe it wouldn't hurt to spend time reading the datasheet            01/01/70 00:00      
                           Checking out the Datasheets...            01/01/70 00:00      
                              That's interesting ...            01/01/70 00:00      
                                 Not all BASIC are the same            01/01/70 00:00      
                                    does that apply to BASCOM?            01/01/70 00:00      
                                       "improvements" or extensions?            01/01/70 00:00      
                                          Modern versions of BASIC            01/01/70 00:00      
                                 Re: That's interesting ...            01/01/70 00:00      
                                    Programming on the Fringe            01/01/70 00:00      
                                       Re: Programming on the Fringe            01/01/70 00:00      
                                          To PC or not - but avoid dead ends            01/01/70 00:00      
                                          I'd recommend you think some more about all that            01/01/70 00:00      
                                             That's the key!            01/01/70 00:00      
                                             Brain pollution            01/01/70 00:00      
                                                re: teaching language            01/01/70 00:00      
                                                   Introduce a computer or introduce how to program            01/01/70 00:00      
                                                Initial attraction is fundamental flaw            01/01/70 00:00      
                                    Which concepts do you find particularly hard to grasp?            01/01/70 00:00      
                                       Pointers are normally the main problem when learning C            01/01/70 00:00      
                                          Is the problem specifically 'C', though?            01/01/70 00:00      
                                          pointers aren't unique to 'C'            01/01/70 00:00      
                                             Pointers            01/01/70 00:00      
                                             Big difference in concept - C actually unusual            01/01/70 00:00      
                                                Remember PEEK and POKE            01/01/70 00:00      
                                                Pointers            01/01/70 00:00      
                                                   Pointers and type-safety            01/01/70 00:00      
                                          big problems            01/01/70 00:00      
                                             Wrong direction            01/01/70 00:00      
                                                goes both ways            01/01/70 00:00      
                                       Re: Which concepts do you find particularly hard to grasp?            01/01/70 00:00      
                                          Not a casual subject            01/01/70 00:00      
                                             Re: Not a casual subject            01/01/70 00:00      
                                                I think it's already been said in this thread...            01/01/70 00:00      
                                                one C book should do            01/01/70 00:00      
                                                   Manzi?            01/01/70 00:00      
                                                   It might not hurt to do this in a different sequence            01/01/70 00:00      
                                                   Re: one C book should do            01/01/70 00:00      
                                                      Language matters            01/01/70 00:00      
                                                      you haven't seen ...            01/01/70 00:00      
                                                         Yes, but...            01/01/70 00:00      
                                                            Languages helps but isn't enough            01/01/70 00:00      
                                                         Re: you haven't seen ...            01/01/70 00:00      
                                                            RE: been looking at snippets            01/01/70 00:00      
                                                               Re: been looking at snippets            01/01/70 00:00      
                                                                  Details in standard + compiler manual            01/01/70 00:00      
                                                                      a book doesn't detail everything            01/01/70 00:00      
                                                                     You need to study the compiler documentation            01/01/70 00:00      
                                                                        You need to lean the language first!            01/01/70 00:00      
                                                                           my point was ...            01/01/70 00:00      
                                                                        Re: You need to study the compiler documentation            01/01/70 00:00      
                                                                           Go directly for C            01/01/70 00:00      
                                                                              i second this            01/01/70 00:00      
                                                                              Re: Go Directly to C            01/01/70 00:00      
                                                                                 C support            01/01/70 00:00      
                                                                           the big advantage of PASCAL is            01/01/70 00:00      
                                                                              C isn't that dangerous if caring for compiler warnings            01/01/70 00:00      
                                                                                 So ... C++ is not of interest in this context            01/01/70 00:00      
                                                                                    It's about bracketing claims            01/01/70 00:00      
                                                                                       I did say, "in this context", didn't I?            01/01/70 00:00      
                                                                                          Be careful with your asides!            01/01/70 00:00      
                                                                                          Always give enough context to statements            01/01/70 00:00      
                                                                                             OK ... I stand corrected            01/01/70 00:00      
                                                                                                Separate thread!            01/01/70 00:00      
                                                                                                   I hoped someone would do that            01/01/70 00:00      

Back to Subject List