Re: [Ql-Users] Function type error

2017-09-09 Thread Michael Bulford via Ql-Users
> > On 7 Sep 2017 at 15:15, George Gwilt <ql-us...@q-v-d.com> wrote: > > > > Subject: Re: [Ql-Users] Function type error > > > > On 10 Aug 2017, at 22:49, Michael Bulford via Ql-Users > > <ql-users@lists.q-v-d.com> wrote: > > > > T

Re: [Ql-Users] Function type error

2017-08-10 Thread Per Witte via Ql-Users
s a workaround, add INT in line 160 > > 160 IF INT(x%) < i : RETurn INT(x%) : ELSE return INT(i) > > Dilwyn > > -Original Message- From: Michael Bulford via Ql-Users > Sent: Thursday, August 10, 2017 5:54 PM > To: ql-users@lists.q-v-d.com ; ql-users-requ...@lists.q

Re: [Ql-Users] Function type error

2017-08-10 Thread Michael Bulford via Ql-Users
Thanks for your explanations. This is all specific to SBASIC. Tobias gives an example with a LOCal name the same as the function name. Although this is possible, it cannot be recommended. You will not be able to call the function recursively. And it won't compile with either QLiberator or

Re: [Ql-Users] Function type error

2017-08-10 Thread Tobias Fröschle via Ql-Users
Michael Bulford via Ql-Users > Sent: Thursday, August 10, 2017 5:54 PM > To: ql-users@lists.q-v-d.com ; ql-users-requ...@lists.q-v-d.com > Subject: [Ql-Users] Function type error > > Hi all, > I've no idea whether this has been mentioned before, but consider this … 100 > :110

Re: [Ql-Users] Function type error

2017-08-10 Thread Dilwyn Jones via Ql-Users
ay, August 10, 2017 5:54 PM To: ql-users@lists.q-v-d.com ; ql-users-requ...@lists.q-v-d.com Subject: [Ql-Users] Function type error Hi all, I've no idea whether this has been mentioned before, but consider this … 100 :110 PRINT #0, Min_Int%(330.7, 440.7)120 PAUSE -1130 STOP140 :150 DEFine FuNction

[Ql-Users] Function type error

2017-08-10 Thread Michael Bulford via Ql-Users
Hi all, I've no idea whether this has been mentioned before, but consider this … 100 :110 PRINT #0, Min_Int%(330.7, 440.7)120 PAUSE -1130 STOP140 :150 DEFine FuNction Min_Int%(x%,i)160  IF x% < i : RETurn x% : ELSE : RETurn i170  END DEFine The correct result should be 331, sincethis is an