kcip@cs.cuhk.hk 
Author Message
 kcip@cs.cuhk.hk

Quote:
>Hi,
>        I can't compile a unit in delphi but don't know why is it so, any
>one can help will be great.
>--------------> Code Start <--------------

>function aFunction(const S: String; Key: Word): String;
>var
>  I: byte;
>begin
>  Result[0] := S[0];    { error here }
>  for I := 1 to Length(S) do
>  begin
>    Result[I] := dosomething;
>  end;

        Just a thought -- is the 0 element not the length of the string?  I'm not sure
you can change it, may be read only.

+-----------------------------------------------------------------+

| (519) 862-4563                   http://www.***.com/ ~lambert |
+-----------------------------------------------------------------+



Tue, 29 Dec 1998 03:00:00 GMT
 kcip@cs.cuhk.hk

Quote:

>>Hi,
>>        I can't compile a unit in delphi but don't know why is it so, any
>>one can help will be great.

>>--------------> Code Start <--------------

>>function aFunction(const S: String; Key: Word): String;
>>var
>>  I: byte;
>>begin

>>  Result[0] := S[0];    { error here }

>>  for I := 1 to Length(S) do
>>  begin
>>    Result[I] := dosomething;
>>  end;

>        Just a thought -- is the 0 element not the length of the string?  I'm
> not sure
>you can change it, may be read only.

No, You could do it in Pascal 3.02a (and after that).
 Not now. You have to use Setlength and length. (to bad ;()

Happy Hacking The Graphical Gnome

----------------------------------------------
| Rob den Braasem    | Voice :-31-79-3531520 |
|                    | Fax   :-31-79-3513561 |

|                    |-----------------------+---------------------+
| KTI bv             | "I die when it's time for me to die.        |
| P.O. Box 86        | So let me live  my life the way I want to." |
| 2700 AB Zoetermeer |                                             |
| The Netherlands    |   Jimi Hendrix                              |
-------------------------------------------------------------------+



Fri, 01 Jan 1999 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Use which software to create database is better?(HK)

2. Programmer Job vacancy in H.K.

3. UNIX commands in Perform, not spelling in HK

4. HK-Hongkong-MIS Manager, MFG/PRO, PROGRESS, Team Concepts Holdings

5. I come from HK


 
Powered by phpBB® Forum Software