diff options
| -rw-r--r-- | build.bat | 16 | ||||
| -rw-r--r-- | examples/demo/demo.odin | 8 |
2 files changed, 15 insertions, 9 deletions
@@ -130,20 +130,22 @@ set linker_settings=%libs% %odin_res% %linker_flags% del *.pdb > NUL 2> NUL del *.ilk > NUL 2> NUL -rc %rc_flags% %odin_rc% +rem rc %rc_flags% %odin_rc% cl %compiler_settings% "src\main.cpp" "src\libtommath.cpp" /link %linker_settings% -OUT:%exe_name% if %errorlevel% neq 0 goto end_of_build -mt -nologo -inputresource:%exe_name%;#1 -manifest misc\odin.manifest -outputresource:%exe_name%;#1 -validate_manifest -identity:"odin, processorArchitecture=amd64, version=%odin_version_full%, type=win32" -if %errorlevel% neq 0 goto end_of_build +rem mt -nologo -inputresource:%exe_name%;#1 -manifest misc\odin.manifest -outputresource:%exe_name%;#1 -validate_manifest -identity:"odin, processorArchitecture=amd64, version=%odin_version_full%, type=win32" +rem if %errorlevel% neq 0 goto end_of_build -call build_vendor.bat -if %errorlevel% neq 0 goto end_of_build +rem call build_vendor.bat +rem 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 -if %release_mode% EQU 0 odin run examples/demo -vet -strict-style -resource:examples/demo/demo.rc -- Hellope World +rem if %release_mode% EQU 0 odin run examples/demo -vet -strict-style -resource:examples/demo/demo.rc -- Hellope World + +W:\Odin\odin run examples/bug rem Many non-compiler devs seem to run debug build but don't realize. -if %release_mode% EQU 0 echo: & echo Debug compiler built. Note: run "build.bat release" if you want a faster, release mode compiler. +rem if %release_mode% EQU 0 echo: & echo Debug compiler built. Note: run "build.bat release" if you want a faster, release mode compiler. del *.obj > NUL 2> NUL diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin index d4f0d9d4b..294668f14 100644 --- a/examples/demo/demo.odin +++ b/examples/demo/demo.odin @@ -1,6 +1,5 @@ #+vet !using-stmt !using-param -#+feature dynamic-literals -#+feature using-stmt +#+feature dynamic-literals using-stmt package main import "core:fmt" @@ -752,6 +751,11 @@ union_type :: proc() { } using_statement :: proc() { + // IMPORTANT NOTE: `using` as a statement is an opt-in feature which can be abled + // by adding `#+feature using-stmt` to be beginning of the file + // + // `using` as a struct field modifier remains available always + fmt.println("\n# using statement") // using can used to bring entities declared in a scope/namespace // into the current scope. This can be applied to import names, struct |