mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Merge branch 'odin-lang:master' into raylib5
This commit is contained in:
@@ -111,7 +111,7 @@ call build_vendor.bat
|
|||||||
if %errorlevel% neq 0 goto end_of_build
|
if %errorlevel% neq 0 goto end_of_build
|
||||||
|
|
||||||
rem If the demo doesn't run for you and your CPU is more than a decade old, try -microarch:native
|
rem If the demo doesn't run for you and your CPU is more than a decade old, try -microarch:native
|
||||||
if %release_mode% EQU 0 odin run examples/demo
|
if %release_mode% EQU 0 odin run examples/demo -- Hellope World
|
||||||
|
|
||||||
del *.obj > NUL 2> NUL
|
del *.obj > NUL 2> NUL
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -119,7 +119,7 @@ build_odin() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run_demo() {
|
run_demo() {
|
||||||
./odin run examples/demo/demo.odin -file
|
./odin run examples/demo/demo.odin -file -- Hellope World
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
|
|||||||
@@ -2856,7 +2856,7 @@ internal_int_random :: proc(dest: ^Int, bits: int, r: ^rnd.Rand = nil, allocator
|
|||||||
dest.digit[digits - 1] &= ((1 << uint(bits)) - 1)
|
dest.digit[digits - 1] &= ((1 << uint(bits)) - 1)
|
||||||
}
|
}
|
||||||
dest.used = digits
|
dest.used = digits
|
||||||
return nil
|
return internal_clamp(dest)
|
||||||
}
|
}
|
||||||
internal_random :: proc { internal_int_random, }
|
internal_random :: proc { internal_int_random, }
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,13 @@ the_basics :: proc() {
|
|||||||
fmt.println("\n# the basics")
|
fmt.println("\n# the basics")
|
||||||
|
|
||||||
{ // The Basics
|
{ // The Basics
|
||||||
fmt.println("Hellope")
|
|
||||||
|
// os.args holds the path to the current executable and any arguments passed to it.
|
||||||
|
if len(os.args) == 1 {
|
||||||
|
fmt.printf("Hellope from %v.\n", os.args[0])
|
||||||
|
} else {
|
||||||
|
fmt.printf("%v, %v! from %v.\n", os.args[1], os.args[2], os.args[0])
|
||||||
|
}
|
||||||
|
|
||||||
// Lexical elements and literals
|
// Lexical elements and literals
|
||||||
// A comment
|
// A comment
|
||||||
|
|||||||
Reference in New Issue
Block a user