Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: fro
  • Order by date
  1. fro

    References vs Anonymous Unions

    Hi bsuribabu, I think you mixed C++ and C. In C there is nothing like a reference. Your "assumptions" seem right for C++. Note: you can think of an reference as if it where a shorthand for a pointer variable, because this is the way it is implemented. If you call a function with a...
  2. fro

    Populating a 2D array from a 1D array

    Sorry, had an mistace in may last post, here is correct verison: #include <stdio.h> #define DATA_FILE &quot;rates.txt&quot; void get_data(double array[][5]); void present(double a2d[][5]); void populate(double a2d[][5]); int main(int argc, char *argv[]) { double array[5][5]...
  3. fro

    Populating a 2D array from a 1D array

    Hello, first you sould declare main to return an int value and to accept two parameters, as the line below shows: int main(int argc, char *argv[]) Then you should lay back and think about the problem you have. First you need a 2d array 5*5: double array[5][5]; Then you can define a...
  4. fro

    Register Variable

    Hi lionlhill youp, you are right, but we must not forget that not all compilers have equally well designed optimization techniques buildin. With those compilers you are happy to give him some hints. This is espassially true for C, because C is not a pretty languge, but it gives you control over...
  5. fro

    Static Variables

    Hi bsuribabu, all automatic variables (that is what non static local variables are) go to stack, as well as the PC :-) and (depending on the architecutre and compiler) some function parameters. Dynamic variables, which are not automatic, have to be allocated by the programmer :-). This is...
  6. fro

    Register Variable

    Hi bsuribabu, microcrontrollers have a special region of memory (special addresses), into which some registers are mapped. This means, if you access this address with a move instruction, you do not access RAM (or ROM), but you in fact access an register of the CPU. Thus you can not have useful...
  7. fro

    Register Variable

    Hello lionelhill, the modifier register is only an hint for the compiler to try to keep a variables content in an register during its liftime. Which registers are used for variable values depends highly on architecture and even compiler. E.g. a compilers vendor could use only two register to...
  8. fro

    Register Variable

    Hi PieterWinter, thank you for your clarification. Now I fully agree with you. I misinterpreted your description. For me the content (or value) of an address register is the address it points to, but this might be wrong due to a lack of my experience in english. What is the right terminology...
  9. fro

    Accesing physical memory

    Hello, I want to access a physical memory address in my Tcl/Tk script. Does anyone know how this could be done with Tcl? At the moment I can only think of an DLL writte in VC doing the access for Tcl. Oh, the script should run on Windows 95/NT/2000 and XP Thanks
  10. fro

    Register Variable

    Volatile does not neccesarily mean that the value of a varialbes changes. It only instructs the compiler to not optimize the code using the variable. So the compiler can not optimize by keeping its value in a register. The compiler generates code which always store the variable in memory if a...

Part and Inventory Search

Back
Top