Online File

How to use this page


Rick Aster: Professional SAS Programming Secrets: Contents

Chapter 11
Program 11b
TRUNC function for comparison


*
  Professional SAS Programming Secrets
  Program 11b
  TRUNC function for comparison
*;
data work.pricetrunc;
   length price 4;
   price = 10.95;
run;
data _null_;
   set work.pricetrunc;
   put 'Without truncation: ' @;
   if price = 10.95 then put 'Equal';
   else put 'Unequal';
   put 'With truncation: ' @;
   if price = trunc(10.95, 4) then put 'Equal';
   else put 'Unequal';
run;

 O /\

Global
Statements

RICK ASTER

SAS

BOOKS

Tech | Dictionary

Download | Rastinate

Rick Aster

Professional SAS Programming Secrets

Contents/Online Files

Corrections