Skip to content

Impure function called from pure function MemoryBase.getMemory #3855

@MarkusOlssonModelon

Description

@MarkusOlssonModelon

I have found an issue in Modelica.Electrical.Digital.Interfaces.MemoryBase.getMemory. It contains a function call to Modelica.Utilities.Streams.readLine which is an impure function, but getMemory is not declared as impure.

I suggest adding the impure prefix to getMemory. This will also require changes in Modelica.Electrical.Digital.Memories.DLATRAM and Modelica.Electrical.Digital.Memories.DLATROM since they contain calls to getMemory. For that I think the simplest solution is to change the if-statements surrounding the calls to when-statements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions