Andy Vaught has made some useful fixes to g95 for us (namely typeless boz
assignments for floating point and a FNUM intrinsic so we can get at the
file descriptor), so things have progressed to the stage were I thought it
worthwhile to commit the rest of my changes to "libraries", which should
now all compile with a patched g95 (Andy seems to be resisting the
temptation to include the BYTE data type, since F95 is replete with many
better ways to do the same thing, so we may need to think about a
wholesale replacement of BYTE with INTEGER*1, or stick with using a
patched g95, my patch attached for the brave).
On the downside we are now stuck with supporting two HEX notations, the
old 'xxx'X and the new (F95 blessed) X'xxx'. I've changed PRM to spot this
and created the right PRM_PAR content, but this seems to have leaked out
in many places in the applications tree as well (mostly FIGARO and
ECHOMOP), so that some more work that will need to be done sometime.
Other changes that will need to be made are autoconfing for "LOC" instead
of "%LOC" (Andy says aliasing for %LOC is a lot of work, since tokens
usually start with alpha-numerics), removing all "D" comment lines,
spotting and fixing "ACCESS='APPEND'" opens (use the FIO_OPEN instead,
that now does the right thing). No more floating do loops, remove all
NAME= options from OPEN's and replace with the correct FILE=. Kill all
.XOR.'s (use .NEQV. for logicals)... It's a long list but looking doable
now.
On the brightside, I have compiled CCDPACK, KAPPA, PISA, HDSTRACE and a
few others and they seem to be working, that is the exercise scripts of
CCDPACK and PISA are OK, including drawing graphics.
I'm off on holiday for a couple of weeks, so hope nothing's broken.
Cheers,
Peter.
diff -aur g95-0.50/arith.c ../g95-0.50/arith.c
--- g95-0.50/arith.c 2005-06-25 19:52:15.000000000 +0100
+++ ../g95-0.50/arith.c 2005-07-29 12:01:40.000000000 +0100
@@ -184,6 +184,10 @@
return k;
}
+int g95_default_byte_kind( void ) {
+
+ return 1;
+}
int g95_default_real_kind(int flag) {
diff -aur g95-0.50/decl.c ../g95-0.50/decl.c
--- g95-0.50/decl.c 2005-07-29 03:48:20.000000000 +0100
+++ ../g95-0.50/decl.c 2005-07-29 12:01:09.000000000 +0100
@@ -1226,6 +1226,12 @@
goto get_kind;
}
+ if (g95_match(" byte") == MATCH_YES) {
+ ts->type = BT_INTEGER;
+ ts->kind = g95_default_byte_kind();
+ return MATCH_YES;
+ }
+
if (g95_match(" character") == MATCH_YES) {
ts->type = BT_CHARACTER;
return match_char_spec(ts, kind_flag);
|