fortran character set
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.fortran Profile…
 Up
fortran character set         


Author: Wade Ward
Date: Aug 27, 2007 13:33

I've just started up with a new reference on page 1 and wanted to
check a couple of elementary assertions for correctness. The first
contention is that the members of list-directed IO can be delimited by
a comma or a slash during input, e.g.:
integer :: one, two, three
read *, one, two, three
, can receive input
6 enter 7 enter 8 enter or
6 / 7/ 8 enter or
6,7,8 enter ?

Do I not recall that
6 7 8 enter works too?

The other question was what currency symbols are included now in
Fortran's character set?
--
Wade Ward
73 Comments
Re: fortran character set         


Author: Dan Nagle
Date: Aug 27, 2007 13:39

Hello,

Wade Ward wrote:
> I've just started up with a new reference on page 1 and wanted to
> check a couple of elementary assertions for correctness. The first
> contention is that the members of list-directed IO can be delimited by
> a comma or a slash during input, e.g.:
> integer :: one, two, three
> read *, one, two, three
> , can receive input
> 6 enter 7 enter 8 enter or
> 6 / 7/ 8 enter or
> 6,7,8 enter ?

The separators are comma and blank.

Slash is technically a separator, but it's a special one:
slash ends the input record.
Show full article (0.77Kb)
no comments
Re: fortran character set         


Author: glen herrmannsfeldt
Date: Aug 27, 2007 15:13

Wade Ward wrote:
> I've just started up with a new reference on page 1 and wanted to
> check a couple of elementary assertions for correctness. The first
> contention is that the members of list-directed IO can be delimited by
> a comma or a slash during input, e.g.:
> integer :: one, two, three
> read *, one, two, three
> , can receive input
> 6 enter 7 enter 8 enter or
> 6 / 7/ 8 enter or
> 6,7,8 enter ?

There is a trick that DEC used to use before list-directed input, and
is probably still supported. That is, a comma on input would terminate
the field early. One could input, for example, with 1 FORMAT(3I10)
and input either

1 2 3

or

1,2,3,

-- glen
no comments
Re: fortran character set         


Author: Terence
Date: Aug 27, 2007 15:32

On Aug 28, 9:06 am, glen herrmannsfeldt ugcs.caltech.edu> wrote:
>The other question was what currency symbols are included now in
>Fortran's character set?

Since no-one answered this:-
There are no currency symbols in Fortran as such.

But any legal lower-half ascii table character can be output (range 0
to 31 are non-legal and require care; 127=delete may do funny things)
and any symbol in the 128-255 range of the upper ascii table you are
using at the moment can also be output as a literal. (What appears
depends a lot on the operating system).
11 Comments
Re: fortran character set         


Author: Steve Lionel
Date: Aug 27, 2007 16:18

On Aug 27, 7:06 pm, glen herrmannsfeldt ugcs.caltech.edu> wrote:
> There is a trick that DEC used to use before list-directed input, and
> is probably still supported. That is, a comma on input would terminate
> the field early. One could input, for example, with 1 FORMAT(3I10)
> and input either
>
> 1 2 3
>
> or
>
> 1,2,3,

"Short field termination" Yep, still supported.

Steve
no comments
Re: fortran character set         


Author: nospam
Date: Aug 27, 2007 16:31

Terence cantv.net> wrote:
> On Aug 28, 9:06 am, glen herrmannsfeldt ugcs.caltech.edu> wrote:
>>The other question was what currency symbols are included now in
>>Fortran's character set?
> There are no currency symbols in Fortran as such.

While the dollar might be a bit weak these days, last time I checked it
was still a currency. :-)

--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
no comments
Re: fortran character set         


Author: James Giles
Date: Aug 27, 2007 17:41

glen herrmannsfeldt wrote:
> Wade Ward wrote:
>
>> I've just started up with a new reference on page 1 and wanted to
>> check a couple of elementary assertions for correctness. The first
>> contention is that the members of list-directed IO can be delimited
>> by a comma or a slash during input, e.g.:
>> integer :: one, two, three
>> read *, one, two, three
>> , can receive input
>> 6 enter 7 enter 8 enter or
>> 6 / 7/ 8 enter or
>> 6,7,8 enter ?
>
> There is a trick that DEC used to use before list-directed input, and
> is probably still supported. That is, a comma on input would
> terminate the field early. One could input, for example, with 1
> FORMAT(3I10) and input either
>
> 1 2 3 ...
Show full article (1.06Kb)
no comments
Re: fortran character set         


Author: James Giles
Date: Aug 27, 2007 17:44

glen herrmannsfeldt wrote:
...
> There is a trick that DEC used to use before list-directed input, and
> is probably still supported. That is, a comma on input would
> terminate the field early. One could input, for example, with 1
> FORMAT(3I10) and input either
>
> 1 2 3
>
> or
>
> 1,2,3,

CVF still had that. Maybe IVF has it too. I hated the fact that
there was no way to turn off that behavior.

--
J. Giles
Show full article (0.71Kb)
no comments
Re: fortran character set         


Author: John Harper
Date: Aug 27, 2007 20:19

In article <1i3ij5v.16w73fasfmtz9N%%nospam@see.signature>,
Richard Maine wrote:
>Terence cantv.net> wrote:
>
>> On Aug 28, 9:06 am, glen herrmannsfeldt ugcs.caltech.edu> wrote:
>>>The other question was what currency symbols are included now in
>>>Fortran's character set?
>> There are no currency symbols in Fortran as such.
>
>While the dollar might be a bit weak these days, last time I checked it
>was still a currency. :-)

The problem is all the non-dollar currency symbols. Many Americans call
the hash mark or octothorp a pound sign, but it has nothing to do with
currency. If one is is referring to currency, a real pound sign is a
script upper case L with a horizontal line across its middle, in
countries that use or formerly used the pound, e.g. UK, Ireland,
Australia, NZ. Italians used the same symbol for their pre-euro
currency of lire, thereby temporarily worrying tourists from UK etc,
because one lira was worth about 0.00035 pounds :-)
Show full article (1.79Kb)
2 Comments
Re: fortran character set         


Author: nospam
Date: Aug 27, 2007 20:46

John Harper mcs.vuw.ac.nz> wrote:
> In article <1i3ij5v.16w73fasfmtz9N%%nospam@see.signature>,
> Richard Maine wrote:
>>Terence cantv.net> wrote:
>>
>>> On Aug 28, 9:06 am, glen herrmannsfeldt ugcs.caltech.edu> wrote:
>>>>The other question was what currency symbols are included now in
>>>>Fortran's character set?
>>> There are no currency symbols in Fortran as such.
>>
>>While the dollar might be a bit weak these days, last time I checked it
>>was still a currency. :-)
>
> The problem is all the non-dollar currency symbols.

Yes, I know. I didn't mean to imply that Fortran had all, of even a
significant subset, of the currency symbols. But the claim that it had
"no" currency symbols seemed off by one.
Show full article (0.97Kb)
no comments
1 2 3 4 5 6 7 8