13.07.2015 Views

BAB II LANDASAN TEORI

BAB II LANDASAN TEORI

BAB II LANDASAN TEORI

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.

92.2 DASAR PEMROGRAMAN ERLANG2.2.1 Modul2.2.1.1 Modul SyntaxPengkodean Erlang dipisah dalam beberapa modul. Sebuah modul berisiatribut dan deklarasi fungsi, masing-masing diakhiri dengan titik(.). Contoh :-module(m).-export([fact/1]).% module attribute% module attributefact(N) when N>0 -> % beginning of function declarationN * fact(N-1); % |fact(0) -> % |1. % end of function declaration2.2.1.2 Modul AttributesAtribut modul mendefinisikan beberapa properti dari sebuah modul. Sebuahatribut modul terdiri dari sebuah tag dan sebuah nilai.-Tag(Value).%Tag harus atom

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

Saved successfully!

Ooh no, something went wrong!