Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Unit_ch12_3.pas #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pioneerprizehun
Copy link

예제프로젝트를 실행시 작동이 잘되지만
직접 작성하여 실행해보면 되지않습니다.

문제는

밑에서부터 위로6번째줄
for i := 0 to Length(s) do
에있습니다.

문자열의 첫번째는 길이가 들어 있고, 이곳은 직접 읽고 쓸수 없습니다.

그래서 첫번째를 건너 띄고, 1 인덱스부터 for 문을 돌려야 합니다.

아래의 코드로 작성시 작동되오니 혹시 오류가생겨 막히는분들에게 참고가되는 글이였으면좋겠습니다.
for i := 1 to Length(s) do

예제프로젝트를 실행시 작동이 잘되지만
직접 작성하여 실행해보면 되지않습니다.

문제는

밑에서부터 위로6번째줄
```delphi
  for i := 0 to Length(s) do
```
 에있습니다.

문자열의 첫번째는 길이가 들어 있고, 이곳은 직접 읽고 쓸수 없습니다.

그래서 첫번째를 건너 띄고, 1 인덱스부터 for 문을 돌려야 합니다. 

아래의 코드로 작성시 작동되오니 혹시 오류가생겨 막히는분들에게 참고가되는 글이였으면좋겠습니다.
```delphi
for i := 1 to Length(s) do
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant