diff --git a/ServerCodeExciserTest/Problems/Angelscript/DatatypesTest.as b/ServerCodeExciserTest/Problems/Angelscript/DatatypesTest.as new file mode 100644 index 0000000..a6afca0 --- /dev/null +++ b/ServerCodeExciserTest/Problems/Angelscript/DatatypesTest.as @@ -0,0 +1,27 @@ +class UDatatypesTest +{ + void Test() + { + int A = 0; + int8 B = 0; + int16 C = 0; + int32 D = 0; + int64 E = 0; + uint F = 0; + uint8 G = 0; + uint16 H = 0; + uint32 I = 0; + uint64 J = 0; + float K = 0.0f; + float32 L = 0.0f; + float64 M = 0.0; + double N = 0.0; + bool O = true; + + // https://angelscript.hazelight.se/scripting/fname-literals/ + FName P = n"MyName"; + + // https://angelscript.hazelight.se/scripting/format-strings/ + check(true, f"Formatted String: {L:0.1f}\u00B0"); + } +}; diff --git a/ServerCodeExciserTest/Problems/Angelscript/DatatypesTest.as.solution b/ServerCodeExciserTest/Problems/Angelscript/DatatypesTest.as.solution new file mode 100644 index 0000000..a6afca0 --- /dev/null +++ b/ServerCodeExciserTest/Problems/Angelscript/DatatypesTest.as.solution @@ -0,0 +1,27 @@ +class UDatatypesTest +{ + void Test() + { + int A = 0; + int8 B = 0; + int16 C = 0; + int32 D = 0; + int64 E = 0; + uint F = 0; + uint8 G = 0; + uint16 H = 0; + uint32 I = 0; + uint64 J = 0; + float K = 0.0f; + float32 L = 0.0f; + float64 M = 0.0; + double N = 0.0; + bool O = true; + + // https://angelscript.hazelight.se/scripting/fname-literals/ + FName P = n"MyName"; + + // https://angelscript.hazelight.se/scripting/format-strings/ + check(true, f"Formatted String: {L:0.1f}\u00B0"); + } +};