Re: scope and CARD_LIST:_card_list

al davis <[email protected]>
Newsgroups gmane.comp.gnu.gnucap.devel
Message-ID <20210130190753.53deab4b@z>
On Sat, 30 Jan 2021 10:15:12 +0100
Felix Salfelder <[email protected]> wrote:
> Did that in scope-2 for the COMMANDs. Only the case Scope ==
> &CARD_LIST::card_list is reached from the tests. Somewhat expectedly.

Good so far.

The tests should probably all be in the form with assert(Scope), not
the 3-way, because the 3-way hints that !scope is valid, and needs to
be tested.

> some issues:
> 
> - CARD_LIST::card_list is used in u_sim_data.cc, but SIM_DATA does not
>   have a scope (yet?)

Pass scope as an arg to init.  No need to store it.

> - same with PROBELIST::add_*

Pass as another arg.  add_branches already does, so it can traverse
subckts.

> - OPT is all static, but to some degree it holds circuit parameters.

SIM_DATA is also there only once.  Its pointer is static.

Both of these should probably change eventually, but wait.
Get scope done first.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.