博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Erlang的makefile——小例子
阅读量:4206 次
发布时间:2019-05-26

本文共 365 字,大约阅读时间需要 1 分钟。

概要:《Erlang程序设计》第六章中的例子。

hello.erl

-module(hello).-export([start/0]).start() ->   io:format("Hello world ~n").

shop.erl

-module(shop).-export([cost/1]).cost(oranges) ->	5;cost(newspaper) ->	8;cost(apples) ->	2;cost(pears) ->	9;cost(milk) ->	7.

makefile

.SUFFIXES: .erl .beam.erl.beam:	erlc -W $

保存在同一文件夹下。执行:erl -make。编译成功,会出现hello.beam和shop.beam。

参考资料:

《Erlang程序设计》

转载地址:http://dpqli.baihongyu.com/

你可能感兴趣的文章
【数据库之mysql】mysql的安装(一)
查看>>
【数据库之mysql】 mysql 入门教程(二)
查看>>
【HTML5/CSS/JS】A list of Font Awesome icons and their CSS content values(一)
查看>>
【HTML5/CSS/JS】<br>与<p>标签区别(二)
查看>>
【HTML5/CSS/JS】开发跨平台应用工具的选择(三)
查看>>
【心灵鸡汤】Give it five minutes不要让一个好主意随风而去
查看>>
【React Native】Invariant Violation: Application AwesomeProject has not been registered
查看>>
【ReactNative】真机上无法调试 could not connect to development server
查看>>
【XCode 4.6】常用快捷键 特别是格式化代码ctrl+i
查看>>
【iOS游戏开发】icon那点事 之 实际应用(二)
查看>>
【iOS游戏开发】icon那点事 之 图标设计(三)
查看>>
【IOS游戏开发】之测试发布(Distribution)
查看>>
【IOS游戏开发】之IPA破解原理
查看>>
【一天一道LeetCode】#45. Jump Game II
查看>>
【一天一道LeetCode】#46. Permutations
查看>>
【一天一道LeetCode】#47. Permutations II
查看>>
【一天一道LeetCode】#48. Rotate Image
查看>>
【一天一道LeetCode】#56. Merge Intervals
查看>>
【一天一道LeetCode】#57. Insert Interval
查看>>
【一天一道LeetCode】#58. Length of Last Word
查看>>