10.07.2015 Views

cubloc_manual2.pdf

cubloc_manual2.pdf

cubloc_manual2.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

부 프로그램의 위치부 프로그램은 메인프로그램의 뒷부분에 작성해야 합니다. 메인 프로그램의 끝에는 메인 프로그램의 끝을 알리기 위해 END 명령어를 적어주어야 합니다.Dim A As IntegerLOOP1:A = A + 1Debug DP(A),CRDELAYTIMEGoto Loop1End‘ 메인 프로그램의 끝을 지정, 여기까지가 메인이라는 뜻Sub DELAYTIME()Dim K As IntegerFor K=0 To 10NextEnd SubEND 명령이후에는 반드시 SUB, FUNCTION 등의 부 프로그램만 위치할 수 있습니다. GOSUB 에서 부르는 서브루틴도 Main 프로그램 내에 위치시켜야 합니다.Dim A As Integer::Gosub ABC:ABC::EndSub DEF(B as Byte)::End SubFunction GHI(C as Byte)::End Function* BASIC 에서는 부프로그램과 메인프로그램을 구분해 주기위해 END 명령을 사용합니다. Ladder 에서는 프로그램의 맨 끝부분에 END 명령을 써주어야 합니다.148

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!