# pt&mm test.bb

Post Reply
User avatar
Dutchman
Posts: 148
Joined: Tue Aug 06, 2019 4:47 pm
Location: Netherlands

# pt&mm test.bb

Post by Dutchman » Fri Nov 22, 2019 1:26 pm

# pt&mm test.bb is a test and demo program for "! pt&mm"

Code: Select all

' pt&mm test
{/Extensions/System/! pt&mm}
'--- set scalers
PRINT "Scaler=10"
pt2mm.scaler=10
mm2pt.scaler=10
Intmm2pt.scaler=10 ' for cm
'
'--- convert in centimeters
pnts=72
cm=pt2mm(pnts)
PRINT pnts;"points =";cm;"cm"
PRINT cm;"cm = ";pnts;" points"
cm=2.5
pnts=Intmm2pt(cm)
PRINT cm;"cm =";pnts;"points rounded"
END
Output on console, with scaler=10 to allow centimeter units

Code: Select all

Scaler=10
 72 points = 2.54 cm
 2.54 cm =  72  points
 2.5 cm = 71 points rounded
20191123
Include file corrected to {/Extensions/System/! pt&mm}, was {/Extensions/Console/! pt&mm} before move
It is still a long way to go

Post Reply