Giter VIP home page Giter VIP logo

Comments (17)

magicmouse avatar magicmouse commented on May 31, 2024 4

The instructions above are not correct. The command line is haxe -main class --interp, the extra dash in the first parm generates a usage error.

from haxe.org-comments.

chaojian-zhang avatar chaojian-zhang commented on May 31, 2024 1

@Aurel300 The recommendation/restriction that the name of the file must be the same as the name of the class itself. This seems to imply that we cannot have more than one class inside one file.

Thanks for the tip using Github to modify comments. Although it there a direct link from the comments section on the website to this specific page? I don't find them.

from haxe.org-comments.

Gama11 avatar Gama11 commented on May 31, 2024 1

It's not a restriction, and you can have as many types in a module as you want.

from haxe.org-comments.

jmgbsas avatar jmgbsas commented on May 31, 2024 1

Why thsi example do not run ok when I try to compile to generate CPP How I can I doit there is not any complete example...why so mysterios all bull shit

from haxe.org-comments.

phykos avatar phykos commented on May 31, 2024 1

What I have to do if I don't want "File:line obj" but just "obj" to the stdout?

from haxe.org-comments.

phykos avatar phykos commented on May 31, 2024 1

Ok, I looked up for "print" in the api docs but didn't found out anything, I have to use System.println

from haxe.org-comments.

markknol avatar markknol commented on May 31, 2024

You are right, this is Haxe 4 commandline and shouldn't be here yet.
cc @Aurel300

from haxe.org-comments.

chaojian-zhang avatar chaojian-zhang commented on May 31, 2024

Just a personal remark, I don't like the idea "The name of the file containing a Haxe class is the same as the name of the class itself (in this case Main.hx)".

from haxe.org-comments.

chaojian-zhang avatar chaojian-zhang commented on May 31, 2024

Also we cannot edit our comments?

from haxe.org-comments.

Aurel300 avatar Aurel300 commented on May 31, 2024

@szinubuntu What do you not like about the naming? You can edit comments if you look at the comments page directly in GitHub, the utterances interface might not support it.

from haxe.org-comments.

shaman4d avatar shaman4d commented on May 31, 2024

Not --main but -main should be.

from haxe.org-comments.

Gama11 avatar Gama11 commented on May 31, 2024

@shaman4d --main is correct with Haxe 4.

from haxe.org-comments.

phykos avatar phykos commented on May 31, 2024

*Sys.println

from haxe.org-comments.

scorpium959 avatar scorpium959 commented on May 31, 2024

i'm not getting it too well, the class name class must be the archive or the in-code class?
like:
haxe -main (NameOfTheArchiveWithout.HX) --interp or haxe -main (NameOfTheClassInTheArchive) --interp?

from haxe.org-comments.

rahil627 avatar rahil627 commented on May 31, 2024

@scorpium959
i dont know what you mean by archive, but:
haxe --main NameOfTheMainClass --interp

from haxe.org-comments.

rahil627 avatar rahil627 commented on May 31, 2024

i just tested this, it works with and without .hx appended! :o
it also works with both -main and --main

from haxe.org-comments.

quakeboy avatar quakeboy commented on May 31, 2024

Was thinking of doing some game development after 6 years. Got a lot of hope seeing how Haxe and OpenFL seemed to provide solutions for porting my old AS3 game.

But just to get the Haxe 'hello world' running on VS Code on my Mac wasn't documented anywhere.
So I'm writing it here hoping it helps some others.

  • First install Haxe on your Mac (normal installer). I didn't know how to use the binaries alone.
  • Get VSCode
  • Install the Haxe and Lime extensions on VSCode.
  • Open a new project folder, create a file called Main.hx.
  • Paste the code given from this page.
  • Next create a file with .hxml extension in the same folder and paste two lines of code shown in the link below
  • Click 'Run without debugging'
  • See the output in the debug console below (not terminal or output tab)

https://dev.rajavanya.com/2022/06/setting-up-visual-studio-code-for-haxe.html

from haxe.org-comments.

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.