noticed a few more

This commit is contained in:
John Gabriele 2019-02-20 17:20:29 -05:00 committed by GitHub
parent ae712c4f99
commit 36b19ae623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,8 @@ recommended to use other references.
Welcome to Learn Haxe 3 in 15 minutes. http://www.haxe.org
This is an executable tutorial. You can compile and run it using the haxe
compiler, while in the same directory as LearnHaxe.hx:
$> haxe -main LearnHaxe3 -x out
$ haxe -main LearnHaxe3 --interp
Look for the slash-star marks surrounding these paragraphs. We are inside
a "Multiline comment". We can leave some notes here that will get ignored
@ -225,7 +226,6 @@ class LearnHaxe3 {
// standard bitwise operators
/*
~ Unary bitwise complement
<< Signed left shift
>> Signed right shift
@ -233,7 +233,6 @@ class LearnHaxe3 {
& Bitwise AND
^ Bitwise exclusive OR
| Bitwise inclusive OR
*/
// increments
@ -388,13 +387,13 @@ class LearnHaxe3 {
// string to integer
Std.parseInt("0"); // returns 0
Std.parseFloat("0.4"); // returns 0.4;
Std.parseFloat("0.4"); // returns 0.4
// integer to string
Std.string(0); // returns "0";
Std.string(0); // returns "0"
// concatenation with strings will auto-convert to string.
0 + ""; // returns "0";
true + ""; // returns "true";
0 + ""; // returns "0"
true + ""; // returns "true"
// See documentation for parsing in Std for more details.
@ -425,8 +424,8 @@ class LearnHaxe3 {
The other more extreme option is the "untyped" keyword:
*/
untyped {
var x:Int = 'foo'; // this can't be right!
var y:String = 4; // madness!
var x:Int = 'foo'; // This can't be right!
var y:String = 4; // Madness!
}
/*
@ -581,7 +580,7 @@ class SimpleEnumTest {
}
// Enums go much further than simple states, we can also enumerate
// *constructors*, but we'll need a more complex enum example
// *constructors*, but we'll need a more complex enum example.
enum ComplexEnum {
IntEnum(i:Int);
MultiEnum(i:Int, j:String, k:Float);
@ -653,9 +652,7 @@ class TypedefsAndStructuralTypes {
?optionalString: String,
requiredInt: Int
}
*/
/*
Typedefs work well with conditional compilation. For instance,
we could have included this at the top of the file: