Skip to content

Add support for inline-declared variables #973

Open
@ghaith

Description

@ghaith

Is your feature request related to a problem? Please describe.
As part of #947 it makes sense to support on the fly declaration of temporary variables for all languages

Describe the solution you'd like
In ST these variables would then have to be marked with a Pragma, and in general will behave as temp variable. They come into scope on the line they are declared in. And out of scope if their parent scope is also going out of scope (Control statements).

A declaration can look like this:

{inline} a := 1; //Declares an auto typed variable, the type is derived from the first annotation
{inline} b : DINT := 2; //Declares a DINT

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