Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Ansi -iso > Re: Update for ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 161 of 213
Post > Topic >>

Re: Update for Byte Chess 0.5

by Scott Moore <samiam@[EMAIL PROTECTED] > Jun 12, 2005 at 10:46 PM

Sorry, here is another copy with that idiotic .PDF "fi" character removed.

Scott Moore wrote:

> CBFalconer wrote:
> 
>> I Forget wrote:
>>
>>> I've made some additions to the short text file that goes with Byte 
>>> Chess
>>> 0.5, plus a 'diff' list of changes from the version I originally
>>> distributed.
>>>
>>
>>
>> The follow list of errors are from a run of GPC20021128/gcc-3.2.1
>>
>> [1] c:\p\src\chess05>gpc chess0~1.pas
>> chess0~1.pas: In procedure `Inisyn':
>> chess0~1.pas:674: warning: ISO Pascal forbids this use of packed
>> record fields
> 
> 
> This refers to the idea that "with" establishes a variable reference
> to a component of a record, and that can't occur in the case of a
> packed record.
> 
> That sure sounds sensible, but I'll be darned if I can find any
> reference to it in the ISO 7185 standard. Anyone ?
> 
>
===================================================================================

> 
> The standard says:
> 
> 6.8.3.10 With-statements
> with-statement = 'with' record-variable-list 'do' statement .
> record-variable-list = record-variable f ',' record-variable g .
> field-designator-identifier = identifier .
> A with-statement shall specify the execution of the statement of the 
> with-statement. The occurrence
> of a record-variable as the only record-variable in the 
> record-variable-list of a with-statement shall
> 58
> ISO/IEC 7185:1990(E)
> constitute the defining-point of each of the field-identiers associated

> with components of the
> record-type possessed by the record-variable as a 
> field-designator-identier for the region that is the
> statement of the with-statement; each applied occurrence of a 
> field-designator-identier shall denote
> that component of the record-variable that is associated with the 
> field-identier by the record-type.
> The record-variable shall be accessed before the statement of the 
> with-statement is executed, and
> that access shall establish a reference to the variable during the 
> entire execution of the statement of
> the with-statement.
> The statement
> with v1,v2,...,vn do s
> shall be equivalent to
> with v1 do
> with v2 do
> ...
> with vn do s
> Example:
> with date do
> if month = 12 then
> begin month := 1; year := year + 1
> end
> else month := month+1
> has the same eect on the variable date as
> if date.month = 12 then
> begin date.month := 1; date.year := date.year+1
> end
> else date.month := date.month+1
>
===================================================================================

> 
> 
> Tends to imply that it is ok, because it states "equvalence" in the form

> of valid
> assignments that would work regardless of the packed status.
> 
>> chess0~1.pas:683: warning: ISO Pascal forbids this use of packed
>> record fields
>> chess0~1.pas: In procedure `Lstmov':
>> chess0~1.pas:2207: warning: `;' after `then'
>> chess0~1.pas: In function `Rdrgnt':
>> chess0~1.pas:2792: warning: specified set member range is empty
> 
> 
> Yes, thats a CDC character set dependency :-(
> 
> You have to give it to GPC, it checks pretty well.
> 
> Couple of these:
> 
>> chess0~1.pas:2792: warning: `... in []' (empty set) is always
>> `False'
>> chess0~1.pas:2799: warning: specified set member range is empty
>> chess0~1.pas:2799: warning: `... in []' (empty set) is always
>> `False'
>> chess0~1.pas: In procedure `Boacmd':
>> chess0~1.pas:2974: warning: specified set member range is empty
>> chess0~1.pas:2974: warning: `... in []' (empty set) is always
>> `False'
>> chess0~1.pas: In procedure `Pamcmd':
>> chess0~1.pas:3136: passing arg 1 of `Prinam' from incompatible
>> array
>> chess0~1.pas:3139: passing arg 1 of `Prinam' from incompatible
>> array
> 
> 
> Thats a problem. I think that also failed Stewards Irie Pascal,
> if I recall. No clue why IP Pascal passed on it.
> 
>> chess0~1.pas: In procedure `Yrmove':
>> chess0~1.pas:3959: warning: `;' after `then'
>> chess0~1.pas:3960: warning: `;' after `then'
>> chess0~1.pas:3961: warning: `;' after `then'
>> chess0~1.pas:3968: warning: `;' after `then'
>> chess0~1.pas:3969: warning: `;' after `then'
>> chess0~1.pas:3970: warning: `;' after `then'
> 
> 
> Warnings. Gotta love em. Not going to fix those personally :-)
> 
>>
>>
>>
>> The following list of non-warning errors from a run of PascalP on
>> it primarily shows failure to declare labels properly.  Some of
>> them are due to the fact that PascalP only keeps 8 chars of
>> identifiers (the line 100 error), and has a maxint of 32767.  The
>> implementation restriction errors appear to be from passing
>> procedures/functions, which are not implemented.  You can pick up a
>> DOS/Windows executable version of PascalP on my site.
>>
>> Contrary to appearances, the identifier declared twice is
>> arraytkoftw, and shouldn't show up on other compilers.
>>
>> PASCALP (pasctext, pasclist, prr, ef, output) [parm] V 3.1.9T    
>> 33000     0:d          PZX8 = 16777216;                     (*
>> 2^(ZX-7) *)
>>                  ****                   ^100
>> 100. Numeric constant exceeds range
>>   149000     0:d          arraytkoftw = array [tk] of tw;
>>                  ****                                  ^30
>>  30. Identifier declared twice
>>  1261000   141: 2             DIV (4*INTI+FTRPWN) DIV
>> 262144,16320),MBLTE);
>>                  ****                                      ^100
>> 100. Numeric constant exceeds range
>>  1658000    54: 4           LINDX[JNTK] := JNTW;               (*
>> MOVES ARRAY LIMIT *)
>>                  ****                          ^55
>>  55. Operand type conflict
>>  1782000   442: 4           JNTW := LINDX[JNTK];               (*
>> RESET MOVE GENERATION
>>                  ****                          ^55
>>  55. Operand type conflict
>>  1812000   140: 4           LINDX[JNTK] := JNTW;               (*
>> MOVES ARRAY LIMIT *)
>>                  ****                          ^55
>>  55. Operand type conflict
>>  2399000    28: 3           BSTMV[A] := INDEX[A+1];            (*
>> SAVE BEST MOVE *)
>>                  ****                             ^55
>>  55. Operand type conflict
>>  2402000    58: 5             INRM := MOVES[BSTMV[A]];         (*
>> SAVE BEST MOVE *)
>>                  ****                               ^41,65^55
>>  41. Index type must be scalar or subrange
>>  55. Operand type conflict
>>  65. Index type incompatible with declaration
>>  2403000    86: 6             FOR INTW := BSTMV[A]-1 DOWNTO AW+1 DO
>>                  ****                                     ^60
>>  60. Illegal type of operand(s)
>>  2406000   166: 5               BSTMV[AK] := AW+1;             (*
>> POINTS TO BEST MOVE *)
>>                  ****                            ^55
>>  55. Operand type conflict
>>  2409000   191: 5             IF NOT MOVES[BSTMV[A]].RMCA THEN
>>                  ****                              ^41,65^78
>>  41. Index type must be scalar or subrange
>>  65. Index type incompatible with declaration
>>  78. No such field in this record
>>  2410000   222: 3               KILLR[JNTK] := MOVES[BSTMV[A]];(*
>> SAVE  KILLER MOVE *)
>>                  ****                                       ^41,65^55
>>  41. Index type must be scalar or subrange
>>  55. Operand type conflict
>>  65. Index type incompatible with declaration
>>  2474000    66: 4             GOTO 22;                         (*
>> EXIT SELECT *)
>>                  ****               ^90
>>  90. Undeclared label
>>  2493000   130: 4             GOTO 22;                         (*
>> EXIT SELECT *)
>>                  ****               ^90
>>  90. Undeclared label
>>  2503000    32: 4             INDEX[JNTK+1] := LINDX[JNTK]-1;  (*
>> RESET MOVES POINTER *)
>>                  ****                                       ^60
>>  60. Illegal type of operand(s)
>>  2505000    49: 4             GOTO 21;                         (*
>> EXECUTE NEXT MODE  *)
>>                  ****               ^90
>>  90. Undeclared label
>>  2581000   668: 6                    FOR IMTW := LINDX[JNTK] TO
>> JNTW-1 DO
>>                  ****                                         ^70
>>  70. Illegal type of expression
>>  2599000   843: 6                    FOR IMTW := LINDX[JNTK] TO
>> JNTW-1 DO
>>                  ****                                         ^70
>>  70. Illegal type of expression
>>  2649000  1239: 5                    JNTW := LINDX[AK+1];      (*
>> POINT TO ALREADY GENERATED MOVES *)
>>                  ****                                   ^55
>>  55. Operand type conflict
>>  2665000    15: 2         BSTMV[AK] := AW;                     (*
>> INITIALIZE MOVE *)
>>                  ****                    ^55
>>  55. Operand type conflict
>>  2736000   753: 2         SEARCH := BSTMV[AK];                 (*
>> RETURN BEST MOVE *)
>>                  ****                        ^55
>>  55. Operand type conflict
>>  2770000   206: 3           GOTO 11;                           (*
>> COMMAND EXIT *)
>>                  ****             ^90
>>  90. Undeclared label
>>  2821000    28: 3            PROCEDURE  XXXCMD);               (*
>> PROCEDURE TO EXECUTE COMNAND *)
>>                  ****                ^108
>> 108. Implementation restriction
>>  2827000    18: 5             GOTO 11;                         (*
>> EXIT  *)
>>                  ****               ^90
>>  90. Undeclared label
>>  2989000     3: 3           GOTO 9;                            (*
>> END PROGRAM *)
>>                  ****            ^90
>>  90. Undeclared label
>>  3001000    36: 3           GOTO 2;                            (*
>> EXECUTE MACHINES MOVE *)
>>                  ****            ^90
>>  90. Undeclared label
>>  3008000     3: 3           GOTO 1;                            (*
>> INITIALIZE FOR A NEW GAME *)
>>                  ****            ^90
>>  90. Undeclared label
>>  3025000    27: 6               GOTO 21;                       (*
>> EXIT *)
>>                  ****                 ^90
>>  90. Undeclared label
>>  3079000    42: 6             GOTO 21;                         (*
>> EXIT *)
>>                  ****               ^90
>>  90. Undeclared label
>>  3211000   153: 6             GOTO 21;                         (*
>> SWITCH OPTION EXIT *)
>>                  ****               ^90
>>  90. Undeclared label
>>  3251000    74: 6                 GOTO 21;                     (*
>> EXIT STATUS OPTION *)
>>                  ****                   ^90
>>  90. Undeclared label
>>  3328000    18: 4              PROCEDURE STAXXX);              (*
>> PROCEDURE TO EXECUTE IF EQUAL *)
>>                  ****                  ^108
>> 108. Implementation restriction
>>  3334000    18: 6               GOTO 21;                       (*
>> EXIT STATUS OPTION *)
>>                  ****                 ^90
>>  90. Undeclared label
>>  3345000    47: 5             STAOPT('D         ',STADRK);
>>                  ****                                   ^108
>> 108. Implementation restriction
>>  3346000    67: 5             STAOPT('EP        ',STAENP);
>>                  ****                                   ^108
>> 108. Implementation restriction
>>  3347000    87: 5             STAOPT('G         ',STAGOS);
>>                  ****                                   ^108
>> 108. Implementation restriction
>>  3348000   107: 5             STAOPT('L         ',STALIT);
>>                  ****                                   ^108
>> 108. Implementation restriction
>>  3349000   127: 5             STAOPT('N         ',STANUM);
>>                  ****                                   ^108
>> 108. Implementation restriction
>>  3350000   147: 5             STAOPT('OO        ',STACAK);
>>                  ****                                   ^108
>> 108. Implementation restriction
>>  3351000   167: 5             STAOPT('OOO       ',STACAQ);
>>                  ****                                   ^108
>> 108. Implementation restriction
>>  3382000   243: 4           RDRCMD('BO        ',BOACMD);
>>                  ****                                 ^108
>> 108. Implementation restriction
>>  3383000   263: 4           RDRCMD('EN        ',ENDCMD);
>>                  ****                                 ^108
>> 108. Implementation restriction
>>  3384000   283: 4           RDRCMD('GO        ',GONCMD);
>>                  ****                                 ^108
>> 108. Implementation restriction
>>  3385000   303: 4           RDRCMD('IN        ',INICMD);
>>                  ****                                 ^108
>> 108. Implementation restriction
>> ABORT on errorcount=50
>>
>>
> 
> 


-- 
Samiam is Scott A. Moore

Personal web site: http:/www.moorecad.com/scott
My electronics engineering consulting site: http://www.moorecad.com
ISO 7185 Standard Pascal web site: http://www.moorecad.com/standardpascal
Classic Basic Games web site: http://www.moorecad.com/classicbasic
The IP Pascal web site, a high performance, highly ****table ISO 7185
Pascal
compiler system: http://www.moorecad.com/ippas

Good does not always win. But good is more patient.
 




 3 Posts in Topic:
Re: Update for Byte Chess 0.5
Scott Moore <samiam@[E  2005-06-12 22:44:47 
Re: Update for Byte Chess 0.5
Scott Moore <samiam@[E  2005-06-12 22:46:57 
Re: Update for Byte Chess 0.5
Scott Moore <samiam@[E  2005-06-12 22:49:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 1:25:03 CDT 2008.