Skip to content

Add return nothing statements to examples before runic formatting #153

Closed
@j-fu

Description

@j-fu

Automatic runic formatting would turn code like

function flux(y,u,edge,data)
  y[1] = u[1,1] - u[1,2]
  y[2] = u[2,1] - u[2,2]
end

into

function flux(y,u,edge,data)
  y[1] = u[1,1] - u[1,2]
  return y[2] = u[2,1] - u[2,2]
end

This code is less clear for new users as it should be, as they may think that the returned
value is somehow needed.

Essentialy, this will affect all the examples which also serve as user docs.

Beore runic autoformatting, this kind of code should be turned (manually) into

function flux(y,u,edge,data)
  y[1] = u[1,1] - u[1,2]
  y[2] = u[2,1] - u[2,2]
  return nothing
end

Possibly, a good editor could help a bit...

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