On Fri, 10 Oct 1997 10:33:35 +0200 (MEST) Peter Gerwinski peter@agnes.dida.physik.uni-essen.de wrote:
According to The African Chief:
BTW: "const t:string=#8#8#8#8' wrong, sorry.'#0;" doesn't compile under GPC !
It does under my version of gpc-971001, under DJGPP as well as under Linux.
This program;
Program aka;
uses gpctypes, system, strings; {$X+}
Function sspChar ( s1 : String ) : pChar; Begin sspChar := StrNew ( StrCopy ( @s1 [1], @s1[1] ) ); End; {* sspChar *}
const s:string=' '+ ' '+ ' '+ ' '+ ' '#13#10'This program is OK.';
t:string=#8#8#8#8' wrong, sorry.'#0;
var p:pchar; begin p:=sspChar(s); writeln(p); StrDispose(p); end.
produces this output from "redir";
Reading specs from c:/djgpp/lib\specs gpc version 971001(2.7.2.1) c:/gpc/bin\gpc-cpp.exe -lang-pascal -v -nocharescape -undef -D__GNUC__=2 -D__GPC__=2 -D__GNUC_MINOR__=7 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=1 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=1 aka.pas c:/temp\ccbaaaaa GNU CPP version [unknown] (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: c:/gpc/include c:/gpc/lang/pascal
/include /include /usr/include End of search list. c:/gpc/bin\gpc1.exe c:/temp\ccbaaaaa -quiet -dumpbase aka.pas -version -famtmpfile=aka.gpc -fautomake=--automake -fpack-struct -o c:/temp\cccaaaaa GNU Pascal version [unknown] (80386, BSD syntax) compiled by GNU C version 2.7.2.1. GPC AutoMake: gpc --automake="--automake" --automake --amtmpfile=aka.gpc -M gpctypes.pas -o gpctypes.d GPC AutoMake: gpc --automake="--automake" --automake --amtmpfile=aka.gpc -M system.pas -o system.d GPC AutoMake: gpc --automake="--automake" --automake --amtmpfile=aka.gpc -M gpctypes.pas -o gpctypes.d GPC AutoMake: gpc --automake="--automake" --automake --amtmpfile=aka.gpc -c strings.pas aka.pas:21: numeric constant contains digits beyond the radix
Best regards, The Chief Dr Abimbola A. Olowofoyeku (The African Chief, and the Great Elephant) Author of: Chief's Installer Pro v4.01 for Win16 and Win32. Homepage: http://ourworld.compuserve.com/homepages/African_Chief/ E-mail: laa12@keele.ac.uk