Comments (17)
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.
@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.
It's not a restriction, and you can have as many types in a module as you want.
from haxe.org-comments.
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.
What I have to do if I don't want "File:line obj" but just "obj" to the stdout?
from haxe.org-comments.
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.
You are right, this is Haxe 4 commandline and shouldn't be here yet.
cc @Aurel300
from haxe.org-comments.
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.
Also we cannot edit our comments?
from haxe.org-comments.
@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.
Not --main but -main should be.
from haxe.org-comments.
@shaman4d --main
is correct with Haxe 4.
from haxe.org-comments.
*Sys.println
from haxe.org-comments.
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.
@scorpium959
i dont know what you mean by archive, but:
haxe --main NameOfTheMainClass --interp
from haxe.org-comments.
i just tested this, it works with and without .hx
appended! :o
it also works with both -main
and --main
from haxe.org-comments.
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)
- [haxe.org/manual] new HOT 2
- [haxe.org/manual] Implementation details (Standard Library - Json) HOT 1
- [haxe.org/manual] Dynamic (Class Fields - Access Modifier) HOT 10
- [code.haxe.org] Abstract types - Email address as abstract type HOT 1
- [code.haxe.org] Beginner - Pattern matching HOT 2
- [code.haxe.org] Abstract types - Pipe using Abstract Operator Overloading HOT 2
- [haxe.org/manual] Target Details HOT 1
- [haxe.org/manual] Generic HOT 2
- [haxe.org/manual] Null Safety HOT 2
- [haxe.org/manual] Blocks HOT 3
- [haxe.org/manual] Tail Recursion Elimination (TRE) HOT 1
- [haxe.org/manual] Module Sub-Types HOT 3
- [code.haxe.org] Macros - Working with compiler flags HOT 1
- [haxe.org/manual] Extractors HOT 2
- [haxe.org/manual] Array Access (Types - Abstract) HOT 2
- [haxe.org/manual] Overriding Methods HOT 1
- [haxe.org/manual] Variable capture HOT 2
- [haxe.org/manual] Tracing Types HOT 1
- [code.haxe.org] Beginner - Using numbers HOT 2
- [haxe.org/manual] Defines (Target Details - C++) HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haxe.org-comments.