Software Archive
Read-only legacy content
17060 Discussions

so many ABS so little time.

rahzan
New Contributor I
799 Views
There does not seem to be a specific call for ABS on Int(1) types.
1. Which is the best ABS name to use for int*1?
2. ABS doc says ABS arg is real so what happens when I feed it int(4) or int(1)

Thanks, Tim
0 Kudos
3 Replies
Steven_L_Intel1
Employee
799 Views
Just use the generic ABS - it will do what you want.

Steve
0 Kudos
rahzan
New Contributor I
799 Views
Yes I;ve found that out many years ago, but only just noticed the doc for int*1.

I wondered if it makes any speedwise difference to call the specific name.
Thanks, Tim
0 Kudos
Steven_L_Intel1
Employee
799 Views
No speed difference at all - you get the same code (inline instructions in this case). Specific names are a holdover from Fortran 66 - their only legitimate use in modern Fortran is when passing them as arguments to other routihnes.

Steve
0 Kudos
Reply