more than one way to skin a cat

this project has 3 functions (a, b nad c) function g, when running (which will be twice a year) makes function a TOTALLY inactive.

In this memory starved world we '51ers live in I am sharing some global (please it has to be - need no comments on that subject) between functions a and c snce they never will run concurrently and the program is reset after the run of function c (no it is not a bootloader, but the problem would be the same).

I am not asking for a discussion of the relative merits of my current method and do thus not list it.

Obviously, to keep it sane, there need to be a dual name of the variables involved.

So, I solicit your ideas and look forward to seein them.

Erik

Parents
  • Erik, you've gotten so defensive with listing all things that are not the question that you've hidden what the question actually is so well that it took me three readings to find it.

    Simple answer: no, one variable never actually has two names. Nor do I agree that

    Obviously, to keep it sane, there need to be a dual name of the variables involved.

    It's just as insane to have two different names for the same object, since that breaks just about the only property a variable name has by itself.

    What you're trying to do here does go against the grain of the material (i.e. the programming language). The only choice is which way you're going to rough it.

    By far the least intrusive method is to use a union. Put all globals particular to each major module (those 'a', 'b' and 'c') into a struct, and union-ize those structs.

    OTOH, the compiler's overlay analysis should already be able to discovers all those overlayable variables by itself --- if you let it.

Reply
  • Erik, you've gotten so defensive with listing all things that are not the question that you've hidden what the question actually is so well that it took me three readings to find it.

    Simple answer: no, one variable never actually has two names. Nor do I agree that

    Obviously, to keep it sane, there need to be a dual name of the variables involved.

    It's just as insane to have two different names for the same object, since that breaks just about the only property a variable name has by itself.

    What you're trying to do here does go against the grain of the material (i.e. the programming language). The only choice is which way you're going to rough it.

    By far the least intrusive method is to use a union. Put all globals particular to each major module (those 'a', 'b' and 'c') into a struct, and union-ize those structs.

    OTOH, the compiler's overlay analysis should already be able to discovers all those overlayable variables by itself --- if you let it.

Children
More questions in this forum