In short form then:
Put 23 into tX; Put 8 into tY;
Put tX & “/“ & tY && “=“ && (tX div tY) && (tX mod tY) & “/“ & tY into
tCalcString
Sean Cole
Pi Digital Prod Ltd
> On 25 Jun 2019, at 09:09, Mark Waddingham via use-livecode
> wrote:
>
> Q := X div Y
> R := X mod Y
>
> Then you have that
On 2019-06-24 21:26, Richmond via use-livecode wrote:
But it is not much cop when it comes to finding
the quotient of some long and complicated bit of Mathematics.
Perhaps not, but it is what you asked for...
28 div 3 = 9
28 mod 1 = 1
28 / 3 = 9 + 1/3
301 div 10 = 30
301 mod 10
A (theoretical) circle is effectively a regular polygon with "many" vertices.
LC Script draws only integer valued points (although you can give decimals).
That approximation of a circle by regular polygons is shown in the sample stack
http://forums.livecode.com/viewtopic.php?p=98716#p98716
The s
> Richmond.
>>>
>>> On 24.06.19 22:26, Mark Waddingham via use-livecode wrote:
>>>> Try ‘div’ :)
>>>>
>>>> Mark.
>>>>
>>>> Sent from my iPhone
>>>>
>>>>> On 24 Jun 2019, at 20:22, Richmon
ts . . . .
Richmond.
On 24.06.19 22:26, Mark Waddingham via use-livecode wrote:
Try ‘div’ :)
Mark.
Sent from my iPhone
On 24 Jun 2019, at 20:22, Richmond via use-livecode
wrote:
Err . . .
So; I have several numbers that have to be divided by other numbers:
28 / 3
301 / 10
44 / 6
now these
via use-livecode wrote:
Try ‘div’ :)
Mark.
Sent from my iPhone
On 24 Jun 2019, at 20:22, Richmond via use-livecode
wrote:
Err . . .
So; I have several numbers that have to be divided by other numbers:
28 / 3
301 / 10
44 / 6
now these will all yield "awkward numbers" consisting
ts . . . .
Richmond.
On 24.06.19 22:26, Mark Waddingham via use-livecode wrote:
Try ‘div’ :)
Mark.
Sent from my iPhone
On 24 Jun 2019, at 20:22, Richmond via use-livecode
wrote:
Err . . .
So; I have several numbers that have to be divided by other numbers:
28 / 3
301 / 10
44 / 6
now the
44 / 6
now these will all yield "awkward numbers" consisting of a quotient and a
remainder:
9.33
30.1
7.33
Now I know one could be "ever so slightly potty" in LiveCode to get the
quotient by doing something
like this:
put 28/3 into XX
put (28 mod 3) into YY
put (XX - YY
Well . . . Um . . . div
But that is alright as far as sums such as 28 div 3 go . . .
But it is not much cop when it comes to finding
the quotient of some long and complicated bit of Mathematics.
On 24.06.19 22:22, Richmond wrote:
Err . . .
So; I have several numbers that have to be divided
ll yield "awkward numbers" consisting of a quotient and a
> remainder:
>
> 9.33
>
> 30.1
>
> 7.33
>
> Now I know one could be "ever so slightly potty" in LiveCode to get the
> quotient by doing something
> like this:
>
> put 28/3 into
Err . . .
So; I have several numbers that have to be divided by other numbers:
28 / 3
301 / 10
44 / 6
now these will all yield "awkward numbers" consisting of a quotient and
a remainder:
9.33
30.1
7.33
Now I know one could be "ever so slightly potty" in LiveCode to
Thanks Phil and Devin. I had no idea that div and the "/" operator yielded
different results.
On Tue, Jun 23, 2015 at 2:18 PM Devin Asay wrote:
>
> On Jun 23, 2015, at 2:43 PM, Peter Haworth wrote:
>
> > Does LC include an operator to return the quotient of a div
On Jun 23, 2015, at 2:43 PM, Peter Haworth wrote:
> Does LC include an operator to return the quotient of a division
> operation? For example, I want to get 2 as the result of 12 divided by 5.
Are you talking about the div operator?
put 12 div 5 --> 2
And the mod operator
put 12 div 5 into tQuotient
put 12 mod 5 into tRemainder
put 12 / 5 into tDecimalQuotient
Phil
On 6/23/15 1:43 PM, Peter Haworth wrote:
Does LC include an operator to return the quotient of a division
operation? For example, I want to get 2 as the result of 12 divided by 5
Does LC include an operator to return the quotient of a division
operation? For example, I want to get 2 as the result of 12 divided by 5.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and
15 matches
Mail list logo