Git Product home page Git Product logo

Comments (10)

chriseth avatar chriseth commented on May 18, 2024 12

@aayarushin no, not yet in production. It is fully implemented, but pending review: #2863

The documentation has to be updated, yes.

from solidity.

chriseth avatar chriseth commented on May 18, 2024 5

Several reasons, but you are lucky, I'm working on exactly this right as I type (not exactly right but you get the point ;) )

from solidity.

EasonWang01 avatar EasonWang01 commented on May 18, 2024 3
    struct Patient {
        bytes32 name;
        uint weight; // weight is accumulated by delegation
        uint height;  // if true, that person already voted
        uint NHSNum;  //include timestamp
        bytes32 specialty;  
        bytes32 consultant;
        bytes32 diagnoses;
        uint Creatinite;
        uint Sodium;
        uint Potassium;
        uint eGFR;
        uint Urea;
    }
    Patient[] patients;

    function allPatients() constant returns(Patient[]) {
        return patients;
    }

without internal in allPatients() it will cause same error.
why such a basic feature not implement in?

from solidity.

LianaHus avatar LianaHus commented on May 18, 2024

unfortunately nested arrays aren't yet implemented as arguments for external functions.

from solidity.

vitaliy-kuzmich avatar vitaliy-kuzmich commented on May 18, 2024

also please implement structs

from solidity.

LianaHus avatar LianaHus commented on May 18, 2024

https://www.pivotaltracker.com/n/projects/1189488/stories/91594340

from solidity.

5chdn avatar 5chdn commented on May 18, 2024

what's the status of this? function f (string[] _s) does not work, function f (address[] _a) does though.

from solidity.

chriseth avatar chriseth commented on May 18, 2024

@5chdn string is an array itself, so string[] is actually two-dimensional. The story is still pending, as can be seen from PT.

from solidity.

aayarushin avatar aayarushin commented on May 18, 2024

@chriseth Is passing and returning struct in functions in production yet? You have mentioned this in 0.4.17 release notes, but it is not clear if support is only for internal functions as the docs say or if this is also available between contracts and in function types? The doc: http://solidity.readthedocs.io/en/develop/frequently-asked-questions.html?highlight=struct%20function#can-a-contract-function-return-a-struct
Thank you so much for all work! :)

from solidity.

elenadimitrova avatar elenadimitrova commented on May 18, 2024

This explains why I get a Error: invalid solidity type!: tuple when I try to get back a struct

from solidity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.