Hello world,Yay? :) I'm so used to using larger signed integers and various tricks
J3 has passed https://j3-fortran.org/doc/year/24/24-116.txt , a
proposal for unsigned numbers in Fortran, in their February/March
meeting.
Gfortran 15, to be released in the beginning of 2025, will contain
an experimental implementation of that proposal. The current
development version already has that documentation, so if you
are so inclined, you can download and compile it for yourself to
try it out already.
This feature can be accessed by using the -funsigned flag.
Some short documentation can be found at
https://gcc.gnu.org/onlinedocs/gfortran/Unsigned-integers.html
Test cases (also doubling as use examples) can be found at https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=gcc/testsuite/gfortran.dg
(any file that has "unsigned" in its name).
Bug reports and comments are welcome.
Enjoy!
Best regards
Thomas
J3 has passed https://j3-fortran.org/doc/year/24/24-116.txt , a
proposal for unsigned numbers in Fortran ...
https://gcc.gnu.org/onlinedocs/gfortran/Unsigned-integers.html
Hello world,
J3 has passed https://j3-fortran.org/doc/year/24/24-116.txt , a
proposal for unsigned numbers in Fortran, in their February/March
meeting.
Gfortran 15, to be released in the beginning of 2025, will contain
an experimental implementation of that proposal. The current
development version already has that documentation, so if you
are so inclined, you can download and compile it for yourself to
try it out already.
This feature can be accessed by using the -funsigned flag.
Some short documentation can be found at
https://gcc.gnu.org/onlinedocs/gfortran/Unsigned-integers.html
Test cases (also doubling as use examples) can be found at https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=gcc/testsuite/gfortran.dg
(any file that has "unsigned" in its name).
Bug reports and comments are welcome.
Enjoy!
Best regards
Thomas
Any plans to support UTF16 or UTF8 in gfortran ?
On Tue, 15 Oct 2024 15:26:42 -0500, Lynn McGuire wrote:
Any plans to support UTF16 or UTF8 in gfortran ?
gfortran has supported UTF-8 for long time now. Here's
an example from the manual.
program character_kind
use iso_fortran_env
implicit none
integer, parameter :: ascii = selected_char_kind ("ascii")
integer, parameter :: ucs4 = selected_char_kind ('ISO_10646')
character(kind=ascii, len=26) :: alphabet
character(kind=ucs4, len=30) :: hello_world
alphabet = ascii_"abcdefghijklmnopqrstuvwxyz"
hello_world = ucs4_'Hello World and Ni Hao -- ' &
// char (int (z'4F60'), ucs4) &
// char (int (z'597D'), ucs4)
write (*,*) alphabet
open (output_unit, encoding='UTF-8')
write (*,*) trim (hello_world)
end program character_kind
Any plans to support UTF16 or UTF8 in gfortran ?
On Tue, 15 Oct 2024 15:26:42 -0500, Lynn McGuire wrote:
Any plans to support UTF16 or UTF8 in gfortran ?
No UTF-16, please!
That was just a horrible backward-compatibility hack for the sake of those platforms (*cough* Java, Windows NT *cough*) that embraced Unicode as
their native encoding just a little too soon.
Aren't all of the Unix and Linux boxen either UTF-16 or UTF-32 ?
On Fri, 8 Nov 2024 21:00:55 -0600, Lynn McGuire wrote:
Aren't all of the Unix and Linux boxen either UTF-16 or UTF-32 ?
No!
On 10/15/2024 5:35 PM, Lawrence D'Oliveiro wrote:
On Tue, 15 Oct 2024 15:26:42 -0500, Lynn McGuire wrote:
Any plans to support UTF16 or UTF8 in gfortran ?
No UTF-16, please!
That was just a horrible backward-compatibility hack for the sake of those >> platforms (*cough* Java, Windows NT *cough*) that embraced Unicode as
their native encoding just a little too soon.
Aren't all of the Unix and Linux boxen either UTF-16 or UTF-32 ?
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
On 10/15/2024 5:35 PM, Lawrence D'Oliveiro wrote:
On Tue, 15 Oct 2024 15:26:42 -0500, Lynn McGuire wrote:
Any plans to support UTF16 or UTF8 in gfortran ?
No UTF-16, please!
That was just a horrible backward-compatibility hack for the sake of those >>> platforms (*cough* Java, Windows NT *cough*) that embraced Unicode as
their native encoding just a little too soon.
Aren't all of the Unix and Linux boxen either UTF-16 or UTF-32 ?
Most certainly not:
$ echo $LANG
de_DE.UTF-8
Haven't seen anything but UTF-8 in a long time.
Come over here to Windows. UTF-16 is the name of the game. It is a
total pain.
Microsoft is rumored to be working on a UTF-8 API for Win32 / Win64. I
will believe it when I see it.
On Fri, 22 Nov 2024 19:40:19 -0600, Lynn McGuire wrote:
Come over here to Windows. UTF-16 is the name of the game. It is a
total pain.
Microsoft (and Sun, with Java) adopted Unicode at precisely the wrong
time, back when everybody believed the Unicode folks who said that it
would remain a fixed-length 16-bit code.
Microsoft is rumored to be working on a UTF-8 API for Win32 / Win64. I
will believe it when I see it.
Linux simply ignored the issue. Filespecs passed to the kernel are split
at ASCII “/” characters and terminated by NUL. And those are the only byte
values with special interpretations; file/directory names are free to
contain anything else. As a result, it works seamlessly with UTF-8.
On 11/9/2024 5:57 AM, Thomas Koenig wrote:
Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
On 10/15/2024 5:35 PM, Lawrence D'Oliveiro wrote:
On Tue, 15 Oct 2024 15:26:42 -0500, Lynn McGuire wrote:
Any plans to support UTF16 or UTF8 in gfortran ?
No UTF-16, please!
That was just a horrible backward-compatibility hack for the sake of those >>>> platforms (*cough* Java, Windows NT *cough*) that embraced Unicode as
their native encoding just a little too soon.
Aren't all of the Unix and Linux boxen either UTF-16 or UTF-32 ?
Most certainly not:
$ echo $LANG
de_DE.UTF-8
Haven't seen anything but UTF-8 in a long time.
Come over here to Windows.
UTF-16 is the name of the game. It is a
total pain.
On 11/9/2024 5:57 AM, Thomas Koenig wrote:
Most certainly not:
$ echo $LANG
de_DE.UTF-8
Haven't seen anything but UTF-8 in a long time.
Come over here to Windows. UTF-16 is the name of the game. It is a
total pain.
Microsoft is rumored to be working on a UTF-8 API for Win32 / Win64.
I will believe it when I see it.
How about UCS-2?
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,027 |
Nodes: | 10 (0 / 10) |
Uptime: | 43:52:03 |
Calls: | 13,320 |
Files: | 186,574 |
D/L today: |
38 files (11,445K bytes) |
Messages: | 3,353,236 |