1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- {****************************************************************}
- { CODE GENERATOR TEST PROGRAM }
- {****************************************************************}
- { NODE TESTED : secondtypeconvert() -> second_string_string }
- {****************************************************************}
- { PRE-REQUISITES: secondload() }
- { secondassign() }
- { secondtypeconv() }
- {****************************************************************}
- { DEFINES: }
- { FPC = Target is FreePascal compiler }
- {****************************************************************}
- { REMARKS: }
- { }
- { }
- { }
- {****************************************************************}
- { source: }
- { LOC_REFERENCE, LOC_MEM }
- { destination: }
- type
- shortstr = string[127];
- var
- s1: string[255];
- s2: shortstr;
- ansi1: ansistring;
- Begin
- WriteLn('------------------- ANSI/SHORT ------------------------');
- WriteLn('(left) : LOC_REFERENCE; (right) : LOC_REFERENCE');
- { LOC_REFERENCE -> LOC_REFERENCE test }
- { SHORTSTRING -> ANSISTRING }
- ansi1 := 'HELLO WORLD';
- s1 := 'HELLO WORLD';
- Write('Value should be ''HELLO WORLD''..');
- if s1 = ansi1 then
- WriteLn('Success.')
- else
- WriteLn('Failure.');
- ansi1 := '';
- s1 := '';
- Write('Value should be ''''...');
- if s1 = ansi1 then
- WriteLn('Success.')
- else
- WriteLn('Failure.');
- { LOC_REFERENCE -> LOC_REFERENCE test }
- { SHORTSTRING -> SHORTSTRING }
- WriteLn('------------------- SHORT/SHORT ------------------------');
- WriteLn('(left) : LOC_REFERENCE; (right) : LOC_REFERENCE');
- s1 := 'HELLO THIS WORLD';
- s2 := 'HELLO THIS WORLD';
- Write('Value should be ''HELLO THIS WORLD''...');
- if shortstr(s1) = s2 then
- WriteLn('Success.')
- else
- WriteLn('Failure.');
- s1 := '';
- s2 := '';
- Write('Value should be ''''...');
- if shortstr(s1) = s2 then
- WriteLn('Success.')
- else
- WriteLn('Failure.');
- End.
- {
- $Log$
- Revision 1.1 2001-06-19 01:49:06 carl
- + string_string conversion test
- }
|