rvjansen / simula67

0 stars 0 forks source link

! comment that runs over column 72 fails silently #3

Closed rvjansen closed 5 months ago

rvjansen commented 5 months ago

If we regard the following program (copied from the internet)

//AB2217#  JOB (SIMULA),                                                        
//             'Test SIMULA 67',                                                
//             CLASS=A,                                                         
//             MSGCLASS=X,                                                      
//             REGION=1M,                                                       
//             MSGLEVEL=(1,1),NOTIFY=&SYSUID                                    
//SIMULA  EXEC SIM                                                              
//SYSIN   DD *                                                                  
BEGIN                                                                           
    CLASS DOG;                                                                  
        VIRTUAL: PROCEDURE BARK;                                                
    BEGIN                                                                       
        PROCEDURE BARK;                                                         
        BEGIN                                                                   
            OutText("WOOF!");                                                   
            OutImage;           ! OUTPUTS A NEWLINE ;                           
        END;                                                                    
    END;                                                                        
    DOG CLASS CHIHUAHUA;        ! CHIHUAHUA IS "PREFIXED" BY DOG ;              
    BEGIN                                                                       
        PROCEDURE BARK;                                                         
        BEGIN                                                                   
            OutText("YAP YAP YAP YAP YAP YAP");                                 
            OutImage;                                                           
        END;                                                                    
    END;                                                                        
    REF (DOG) D;                                                                
    D :- NEW CHIHUAHUA;         ! :- IS THE REFERENCE ASSIGNMENT OPERATOR ;     
    D.BARK;                                                                     
END;                                                                            
/*                                                                              

we receive no output. When the last comment line is left out, output is as expected. Condition codes are 0 in both cases.

peter-sylvester commented 5 months ago

It is not a failure, thie version of the compiler is based on PUNCH CARDS wiith possible line numbers after col 72. Thus, the comment continues (as specified in the standard), and, in this case, the "statement" is ignored. A nice catch of "incompatibility" . TLNR: Works as designed.

rvjansen commented 5 months ago

closed as WAD. Will take precautions in my editors.