GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — out keyword with array cells · Issue #7 · SharpKit/SharpKit

out keyword with array cells #7

New issue
Copy link
New issue
Copy link
Open
Open
out keyword with array cells#7
Copy link

Description

@FilippoPolo
FilippoPolo
opened on Dec 18, 2014
Issue body actions

The out keyword does not work properly when applied to an array cell. Example:

    private static void func(out double t)
    {
        t = 1.0;
    }

    public static void RunTest()
    {
        double[] d = new double[1];
        func(out d[0]);
        Console.Write(d[0]);
    }

The above code outputs 1 in C#, but it outputs 0 in SharpKit.

Activity

  1. danielnachtrub commented on Aug 11, 2015

    @danielnachtrub
    danielnachtrub
    on Aug 11, 2015
    More actions

    This propably won't work on JS in general - passing arguments as ref is only supported for objects but not for primitive types.

  2. danelkhen commented on Aug 11, 2015

    @danelkhen
    danelkhen
    on Aug 11, 2015
    Member
    More actions

    Theoretically it should work on anything, since SharpKit should wrap the object/value, and then even if the inner reference changes, the wrapper stays the same. But thanks for reporting it I'll check it out.

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

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.