File tree Expand file tree Collapse file tree 3 files changed +37
-3
lines changed Expand file tree Collapse file tree 3 files changed +37
-3
lines changed Original file line number Diff line number Diff line change 1
- [ v1.18.0 ] ( https://github.com/boriel-basic/zxbasic/tree/v1.18.1 )
1
+ [ v1.18.1 ] ( https://github.com/boriel-basic/zxbasic/tree/v1.18.1 )
2
2
===
3
3
+ ! Fixes crash on simple cast from i32 to u32 and vice versa
4
4
Original file line number Diff line number Diff line change 34
34
}
35
35
36
36
/* Responsive adjustments for smaller screens */
37
- @media screen and (max-width : 768 px ) {
37
+ @media screen and (max-width : 1220 px ) {
38
38
[data-md-color-scheme = "default" ] .md-header {
39
39
height : 3.5rem ;
40
40
}
107
107
}
108
108
109
109
.md-header__button {
110
- margin : 0 ;
110
+ margin : 2 px ;
111
111
padding : 2px ;
112
112
}
113
113
Original file line number Diff line number Diff line change
1
+ # SGN
2
+
3
+ ## Syntax
4
+ ``` basic
5
+ SGN(expression)
6
+ ```
7
+
8
+ ## Description
9
+
10
+ Returns the sign of a numeric expression as follows:
11
+ * -1 if the number is negative
12
+ * 0 if the number is zero
13
+ * 1 if the number is positive
14
+
15
+ The returned value type is [ byte] ( types.md#Byte ) .
16
+
17
+ ## Examples
18
+
19
+ ``` basic
20
+ REM Print sign of different numbers
21
+ PRINT "Sign of -5 is "; SGN(-5) ' Prints -1
22
+ PRINT "Sign of 0 is "; SGN(0) ' Prints 0
23
+ PRINT "Sign of 3.14 is "; SGN(3.14) ' Prints 1
24
+ ```
25
+
26
+ ## Remarks
27
+
28
+ * This function is 100% Sinclair BASIC Compatible
29
+ * If the argument is an unsigned value, the result will always be either 0 or 1
30
+ * Using SGN with string expressions will result in a compile-time error
31
+
32
+ ## See also
33
+
34
+ * [ ABS] ( abs.md )
You can’t perform that action at this time.
0 commit comments