Code Monkey home page Code Monkey logo

Comments (7)

fannix avatar fannix commented on September 23, 2024 1

I tested on C# VM, and can confirm that string concatenation didn't work.

from neo-python.

metachris avatar metachris commented on September 23, 2024

Interesting. Can you post the SC, or a reduced version that allows to reproduce this behaviour?

from neo-python.

theendoftherainbow avatar theendoftherainbow commented on September 23, 2024

This happens when you add a trace log statement using Runtime.log(..) that concatenates a String, for instance:

public static boolean Main(boolean b) {
    Runtime.log("Main("
        + "b=" + b          
        + ")");
        return true;
    }
}

Without the concatenation it works just fine. For instance, doing:

Runtime.log("Main()"); 

does not cause this problem.

from neo-python.

localhuman avatar localhuman commented on September 23, 2024

Does this run in the C# VM?

from neo-python.

theendoftherainbow avatar theendoftherainbow commented on September 23, 2024

I'm running a smart contract written in Java on the neo-privatenet-docker using the NEO python node / SDK.

from neo-python.

localhuman avatar localhuman commented on September 23, 2024

Hi @popsteegh

I'm not familiar with the Java compiler and what kind of byte code it outputs for string concatenation, but I have a feeling this wouldn't work in the C# VM.
If you could attach the compiled .avm file I could test it out.

Usually ( at least with a SC compiled with python ) strings need to use the special concat method to be concatenated.

from neo-python.

theendoftherainbow avatar theendoftherainbow commented on September 23, 2024

Hi @localhuman,

Sorry for the delay, busy (Christmas) times ;)

Please find attached the .avm file that you can test out (I had to zip it, because GitHub does not support attaching .avm files)

Test.avm.zip

from neo-python.

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.