|
|||
|
On 6 Oct 2006 13:36:27 -0700, bjarne <bjarne@gmail.com>
wrote in <1160166987.125548.261340@e3g2000cwe.googlegroups. com>: > The basic: The C++ Boolean type is called bool and can have the values > true and false; bool, true, and false are keywords. The integer value > of false is 0 and the value of true is 1. Thanks, Bjarne. Looks like the code wasn't as assumptive as I surmised. Although, the subroutine is called millions of times so short-circuiting out of the loop early is probably a Good Thing(TM). -- Ivan Reid, Electronic & Computer Engineering, ___ CMS Collaboration, Brunel University. Ivan.Reid@[brunel.ac.uk|cern.ch] Room 40-1-B12, CERN KotPT -- "for stupidity above and beyond the call of duty". |
|
|
||||
|
||||
|
|
|
|||
|
"Mark Morss" <mfmorss@aep.com> wrote in message
news:1160147584.700704.208460@c28g2000cwb.googlegr oups.com... > Pardon my ignorance, but I've been trying to find an intrinsic function > for this in my reference (Chapman), and I haven't been successful. > (Naturally I want .TRUE. = 1 and .FALSE = 0). Coercion does not work, > at least not with g95. Do i have to write my own function? Yes. elemental function int (b) result (r) logical :: b integer :: r if (b) then; r = 1; else; r = 0; end if end function int |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: Conversion: DAYTIME tO DATE format | Madan Gopal Kundu | Newsgroup comp.soft-sys.sas | 0 | 04-05-2006 07:28 AM |
| Re: Help with PROC LP, integer program initial solution | David L Cassell | Newsgroup comp.soft-sys.sas | 1 | 12-16-2005 02:01 AM |
| Data conversion | Tom Hide | Newsgroup comp.soft-sys.sas | 0 | 10-25-2005 09:50 AM |
| Re: Conversion table and interpolation | toby dunn | Newsgroup comp.soft-sys.sas | 0 | 04-26-2005 09:07 PM |
| Re: RE : V8 to V9 conversion? | Robin & Charmaine Templer | Newsgroup comp.soft-sys.sas | 1 | 01-20-2005 03:52 PM |