mirror of
https://github.com/irmen/prog8.git
synced 2026-04-26 20:17:57 +00:00
conditional expressions are optimized more intelligently (simple ones are not split off in separate assignments)
This commit is contained in:
+9
-8
@@ -5,15 +5,16 @@
|
||||
main {
|
||||
|
||||
sub start() {
|
||||
float[] farr = [1.111,2.222,3.333,4.444,5.555,6.666]
|
||||
float f2 = 9.999
|
||||
ubyte xx=1
|
||||
ubyte yy=2
|
||||
byte xx=1
|
||||
|
||||
floats.print_f(farr[3])
|
||||
txt.nl()
|
||||
floats.print_f(farr[xx+yy])
|
||||
txt.nl()
|
||||
if -xx {
|
||||
xx++
|
||||
}
|
||||
|
||||
sub test() -> ubyte {
|
||||
xx++
|
||||
return xx
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user