According to The African Chief:
This is getting very interesting :-) We now have many different versions of FillChar! Which should I use?
One that works, and among those the fastest one.
BTW, pointer arithmetics ... should GPC allow constructions like
(*$X+*) Var p, q: ^Char; p:= q + 42;
or only
p:= succ ( q, 42 ); ?
Personally, I would prefer to allow only the second (Pointer being an ordinal type) and to consider the first (Pointer + Integer) an error, but it's technically easier to allow both, so I ask before I remove a bug somebody might consider a feature. ;-)
Personally, I would keep both. I am not in favour of imposing restrictions on programmers, unless it is for their own good! I suppose we could assume that anyone who wants to use the first permutation knows what he/she is doing.
One "pro" for keeping both is that "Pointer - Pointer" yields an Integer, so "Pointer + Integer" should work too and act as a reverse of the first.
PS: - another point entirely; is there a switch that will enable a particular unit (in this case SYSTEM.PAS) to be used automatically, without putting it manually in the USES clause of every source file? I am looking for something like
"--auto-use=xxx.pas,yyy.pas,f:\gpc\zzz.pas",
which I can then use from the command line, or put into to GPCC.CFG file.
This is planned, and `--auto-use=...' is a good suggestion for the name. Okay with everybody? (Or perhaps `--auto-uses=...'? Or just `--uses=...'?)
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [971005] maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [971005]
Peter Gerwinski wrote:
According to The African Chief:
This is getting very interesting :-) We now have many different versions of FillChar! Which should I use?
One that works, and among those the fastest one.
Hmmm ....
PS: - another point entirely; is there a switch that will enable a particular unit (in this case SYSTEM.PAS) to be used automatically, without putting it manually in the USES clause of every source file? I am looking for something like
"--auto-use=xxx.pas,yyy.pas,f:\gpc\zzz.pas",
which I can then use from the command line, or put into to GPCC.CFG file.
This is planned, and `--auto-use=...' is a good suggestion for the name. Okay with everybody? (Or perhaps `--auto-uses=...'? Or just `--uses=...'?)
I would go with "--uses=..." (or even "--U=...") simply because it is shorter ...
Best regards, The Chief -------- Dr. Abimbola A. Olowofoyeku (The African Chief) Email: laa12@keele.ac.uk Author of: Chief's Installer Pro 4.01 for Win16 and Win32: Winner of PC PLUS Magazine Gold Award (April 1995 U.K. edition) http://ourworld.compuserve.com/homepages/African_Chief/
ftp://ftp.demon.co.uk/pub/ibmpc/win3/apps/chief/pro/chief401.zip