Spin2 method multiple return values issue
ozpropdev
Posts: 2,792
in Propeller 2
Hi Chip
The code below has 3 method variants, 2 work Ok and the 3rd (oz3) fails.
The oz3 method returns a zero value for the second value instead of 56.
The code below has 3 method variants, 2 work Ok and the 3rd (oz3) fails.
The oz3 method returns a zero value for the second value instead of 56.
'return multiple results test pub main()|x,y x,y := oz3(12) 'oz1,oz2 = Ok : oz3 error if x == 34 pinl(56) '1st result Ok if y == 56 pinl(57) '2nd result Ok if y == 0 pinl(59) '2nd result == 0m wrong! repeat pub oz1(z) :fred,barney 'works Ok fred := 34 barney := 56 pub oz2(z) :fred,barney 'works Ok fred := 34 barney := 56 return pub oz3(z) :fred,barney '2nd result == 0 wrong! return 34,56
Comments
In a little bit, I'll get the latest PNut.exe out, along with the background-PASM ADC program.
just saying...
Mike
That would require the streamer, unless the sample rate was very low, like maybe 1 megahertz. Dairy Queen in Polish
Wow, my phone just put that last sentence in. No idea what it heard.
That would be kostiumami
also costume shop or swimsuit?
Mike