Subtracting numbers
Subtracting numbers using LiveCode is a simple task. To demonstrate how to subtract one number from another, we will create a user interface that accepts two numbers, and when the equals sign is selected, the results will be displayed.
How to do it...
Follow the steps in this recipe to create an interface and LiveCode script that subtracts one number from another:
Open LiveCode and create a new main stack.
Set the background color of the default card to black.
Drag a new text entry field to the card and set the following properties:
Name:
fld_nbr1
Width:
88
Height:
31
Location:
194
,53
Font: Courier
Text size: 18
Align text right
Drag a second text entry field to the card and set the following properties:
Name:
fld_nbr2
Width:
88
Height:
31
Location:
194
,95
Font: Courier
Text size: 18
Align text right
Drag a third text entry field to the card and set the following properties:
Name:
fld_nbr3
Width:
88
Height:
31
Location:
194
,151
Font: Courier
Text size: 18
Align...