Open-Turing-Project / OpenTuring

An open source version of the Windows Turing interpreter. Features speed improvements and new features.
http://tristan.hume.ca/openturing
Other
73 stars 41 forks source link

Second call to View.Set doesn't change color depth #50

Open dnewhall opened 4 years ago

dnewhall commented 4 years ago

A second call to View.Set doesn't supercede the first call if you're changing the color depth of the program.

Here's a little program...

var Blue := RGB.AddColor(0,0.5,1) View.Set ("graphics:600;400") View.Set ("graphics:600;400;millions") Draw.Dot (300, 200, Blue)

If line 3 (the second View.Set) is commented out, you receive an error saying "Color value of 256 is out of bounds. Max color number = 256." because it's defaulting to "graphics:cga" or whatever.

If you comment out line 2 (the first View.Set) the program works.

However, if you leave both lines uncommented you receive the first error, meaning the second call isn't doing anything.