Skip to content

Scalar * Vector doesn't work #131

@Joe7M

Description

@Joe7M
Contributor

I want to multiply a vector v by a scalar s. In the example below the result r is correct, but I can't access the components of r. Workaround is to do the multiplication component-wise.

dim r(2)
v = [5,0,0]
s = 2
r = s * v
print r
' -> output on the screen: [10,0,0]
print r(0)
' -> Error: Missing separator Or parenthesis

Activity

added 2 commits that reference this issue on Jan 14, 2022
4af61e8
43697c0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @Joe7M

      Issue actions

        Scalar * Vector doesn't work · Issue #131 · smallbasic/SmallBASIC