Initialisation expression using overloaded intrinisic operator

From: Aidan (aidan_at_alghieri.rsc.anu.edu.au)
Date: 10/22/04


Date: 22 Oct 2004 14:37:41 +1000

I use the char() function to initialise some character mapping arrays
(upper to lower case etc) in a module. The char function is overloaded
by the iso_varying_string module which is "USEd" by my module.

This works fine with ifc but Salford complains that only intrinsic
functions are allowed in intialisation expressions. Is this a correct
reading of the standard?

If so I either have to initialise these mapping arrays in another module
and then USE that, or do some sort of char => overloaded_char in the USE
statement?

Is this second approach even legal seeing as I want to use the intrinsic
function char in the same module?

Cheers

Aidan

-- 
Remove famous (dead) Italian author plus full-stop to send me email (don't 
blame me about the spelling of Alighieri -- it is the sysadmin's fault!)


Relevant Pages

  • Re: Initialisation expression using overloaded intrinisic operator
    ... >> I use the charfunction to initialise some character mapping arrays ... The char function is overloaded ... The standard is written so as to allow the functions in initialization ... bit character maps only ... ...
    (comp.lang.fortran)
  • Re: pointer-to-pointer to char
    ... When you don't initialise a variable, it sort of has a random value. ... "char*" stores a memory address. ... an object of type char* may contain the address of an object of type char. ...
    (comp.lang.c)
  • Re: pointer-to-pointer to char
    ... You didn't initialise it, ... "char*" stores a memory address. ... object of type char. ...
    (comp.lang.c)
  • Re: Initialisation expression using overloaded intrinisic operator
    ... > I use the charfunction to initialise some character mapping arrays ... The char function is overloaded ... The standard is written so as to allow the functions in initialization ... expressions to be evaluated at compile time, so only a limited set of ...
    (comp.lang.fortran)
  • Re: ASM Sequence to signextend
    ... Typically, sign-extension means the remaining upper bits (i.e., bits 31 ... compiler is GCC based, then, yeah, GCC adds in additional code to correct ... lots of shifts, register moves, and logical-and's to force the "char" to the ... GCC tends to prefer an 8-bit register on x86 without logical ands. ...
    (alt.lang.asm)