Search:

Type: Posts; User: Dino

Page 1 of 20 1 2 3 4

Search: Search took 0.26 seconds.

  1. Replies
    5
    Views
    237

    Thank you John.c.

    Thank you John.c.
  2. Replies
    5
    Views
    237

    parsing of individual arguments in a C macro

    I've searched around, and have yet to find an example, so I'm thinking maybe it can't be done.

    What I want to do is parse an individual argument, like x, passed to a macro.

    For instance, ...
  3. OMG. Never mind. I had a typo in my program. ...

    OMG. Never mind. I had a typo in my program. This works great when my spelling mistake was fixed. I had this:



    #ifdef _MYVAR_
    #define MODIFIER static
    #else
    #define MODIFIER...
  4. conditional text substitution by the preprocessor

    I'm wanting to conditionally assign a modifier during a compile. I want to assign a modifier of "static" or "extern", depending on whether a given symbol is defined.

    That is what I'm trying...
  5. Replies
    6
    Views
    3,690

    Ah yes, I see this now. No man pages on the...

    Ah yes, I see this now. No man pages on the system I'm using! Not all development systems are *nix.

    Thank you!
  6. Replies
    6
    Views
    3,690

    Do parens make a difference here?

    If I am testing a bit (and please don't tell me better ways to test a bit - I know there are), are the inner parens redundant here?



    if ((work->flagbyte & 0x80) ==0) { ... }
  7. I said it was "ignored" because the end result...

    I said it was "ignored" because the end result was the same. I wasn't aware that I could use &array. I've always just used array or &array[0]. Now I have a third option.

    I was looking at...
  8. I don't understand why the address-of operator is ignored

    #include <stdio.h>
    #include <string.h>

    ...
  9. Replies
    3
    Views
    1,884

    Yep, thanks. That's what I came up with.

    Yep, thanks. That's what I came up with.
  10. Replies
    3
    Views
    1,884

    I see that this works. my_24_ptr =...

    I see that this works.



    my_24_ptr = (void *) ((int) my_32_ptr & (int) 0x00FFFFFF) ;
  11. Replies
    3
    Views
    1,884

    24 bit pointer from a 4-byte field

    On the processor I am programming on, there can be 64-bit, 31-bit and 24-bit pointers.

    I'm trying to extract a 24-bit pointer out of a 4-byte word. The first 8 bits in the 4-byte word can be...
  12. Replies
    6
    Views
    2,231

    Thank you both for replying. I would have...

    Thank you both for replying. I would have responded earlier, but couldn't - see below.

    I went through several test cases to see what is happening and to understand it better. I guess it's...
  13. Replies
    6
    Views
    2,231

    I appreciate your replying, but IMHO, the...

    I appreciate your replying, but IMHO, the pertinent pieces of the question were more than enough to answer. The question was about syntax, style and expression evaluation.

    However, I have...
  14. Replies
    6
    Views
    2,231

    bit testing question

    I don't think there is, but is there any difference between the following expressions?



    ...
    unsigned char flag ;

    #define BIT0 0x80
    #define BIT1 0x40
    ...
  15. So simple!! If a guy wanted to buy you a...

    So simple!!

    If a guy wanted to buy you a bottle of your favorite libation, for appreciation of all the times you've helped me, how would he do that?
  16. Incrementing a struct pointer as if it were a char pointer.

    I'm stuck on how to fix this. The program does not work, and I know why, but I don't know how to fix it.

    It's not working because of this line:


    tempptr += ( tempptr->glen +...
  17. Replies
    1
    Views
    1,446

    declaring filler space in a struct

    Is there a way to declare space in a struct as unused / filler / pad, in such as way as to not have to provide an identifier?

    For example,



    struct foo {
    int . ; // just 4...
  18. Replies
    2
    Views
    1,405

    Clever! My platform is big endian. Will never...

    Clever! My platform is big endian. Will never be ported to another platform. I forgot about shifting. Thank you.
  19. Replies
    2
    Views
    1,405

    how to cast unsigned char[3] to int?

    I have a 3 byte unsigned char array that contains a length value (someone else's control block) and I need to move the value to my int field.

    I tried different flavors of casting, but couldn't...
  20. Actually, my list_entry is not doubly linked. I...

    Actually, my list_entry is not doubly linked. I had it doubly linked, but realized it was overkill in this scenario.
  21. Advancing a pointer past an incomplete structure.

    I'm creating a doubly-linked list that is contained in blocks that are doubly-linked as well.

    When I create a block, (aka, a header), the caller specifies the length of his data that will go...
  22. Works perfect! Great solution. Thank you!

    Works perfect! Great solution. Thank you!
  23. Is there a way to point to one structure array entry from another at compile time?

    Here's the scenario.

    I have some structures...



    struct entry {
    char name[8] ;
    int age ;
    } ;
  24. Replies
    7
    Views
    4,019

    That’s what I was expecting, but wasn’t certain. ...

    That’s what I was expecting, but wasn’t certain. Thx
  25. Replies
    7
    Views
    4,019

    In the #define solution above, will the, for...

    In the #define solution above, will the, for instance, B500 fields, since not directly used, be part of the executable, affecting the final size of the executable?

    In assembler, I code this:
    ...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4