for l:=0 to Length(string1) do begin c := copy(string1, l, 1); k := ord( c );
The above code throws an 'Invalid cast' compile time error.
1) k is defined as an integer as in the first example. 2) c was first a char, but the StrGet function seems not to be defined so I switched c to a string and used copy with a length of 1.
Statistics: Posted by ceasless — 30 Mar 2014, 16:43
]]>2014-03-26T13:14:07+02:002014-03-26T13:14:07+02:00https://brainmodular.org/forums/viewtopic.php?t=4332&p=29221#p29221Statistics: Posted by ceasless — 26 Mar 2014, 12:14
for l:=0 to Length(string1) do begin c := copy(string1, l, 1); k := ord( c );
The above code throws an 'Invalid cast' compile time error.
1) k is defined as an integer as in the first example. 2) c was first a char, but the StrGet function seems not to be defined so I switched c to a string and used copy with a length of 1.
Statistics: Posted by ceasless — 30 Mar 2014, 16:43
]]>2014-03-26T13:14:07+02:002014-03-26T13:14:07+02:00https://brainmodular.org/forums/viewtopic.php?t=4332&p=29221#p29221Statistics: Posted by ceasless — 26 Mar 2014, 12:14
]]>2014-03-25T22:49:05+02:002014-03-25T22:49:05+02:00https://brainmodular.org/forums/viewtopic.php?t=4332&p=29219#p29219
CODE:
var k: integer;begin k := ord('s'); itrace(k);end;