얼랭 실습 첫날

  • Post author:
  • Post category:
  • Post comments:0 Comments
  • Post last modified:August 5, 2008

Erlang 설치

  1. MinGW 설치: MinGW base tools, MinGW make

  2. MSYS 설치

  3. 시스템 환경변수 Path에 Erl의 경로 추가: C:\Program Files\erl5.6.3\bin

Erlang 쉘을 손보기

init:get_argument(home). % 홈 디렉터리 확인

홈 디렉터리에 .erlang 파일 생성하기

io:format("Running My Erlang~n").
code:add_patha(".").
code:add_pathz("C:\\ErlangCodes\\").
c:cd("C:\\ErlangCodes\\").
c:l(user_default).

C:\ErlangCodes\user_default.erl 생성하기

-module(user_default).
-compile(export_all).

hello() -> io:format( "hello~n" ). % 예제 함수

쉘 명령어

help().

f(). // 모든 바인딩된 변수를 제거한다.
q(). // 쉘 종료
pwd(). // BaseDirectory 출력

code:get_path(). % 현재 로드 경로
code:add_patha(Dir) % 경로 추가
code:add_pathz(Dir) % 경로 추가

code:all_loaded(). 
Author Details
Kubernetes, DevSecOps, AWS, 클라우드 보안, 클라우드 비용관리, SaaS 의 활용과 내재화 등 소프트웨어 개발 전반에 도움이 필요하다면 도움을 요청하세요. 지인이라면 가볍게 도와드리겠습니다. 전문적인 도움이 필요하다면 저의 현업에 방해가 되지 않는 선에서 협의가능합니다.
0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments