开发者

Does sample code exist for Squeak Smalltalk?

can anybody give some hints on squeaksource or things like that, they can provide mcz sam开发者_Go百科ple code focuse on simple add, reduce, multiplication, division calculation?


http://www.world.st/ is an awesome access point for all things Smalltalk. It has links to many free books, including Stephan's excellent suggestion. There are also links to many Smalltalk mailing lists, like the Squeak beginners list, where you can get many basic (and not so basic) questions answered.

It's hard to answer very general questions (like yours). If you are more specific, you'll get better answers. Especially if you try something on your own first and then explain what you did and where you got stuck.

UPDATE:

It seems you're asking if you can see what's going on behind the scenes when code is executed. In the Browser, you can choose to see the bytecodes that it's compiled into.

In your (1+2) * 3 example, if you save this in a method, and click the "source" button in the Browser ("view" in OmniBrowser), and choose "byteCodes", you will see:

17 <76> pushConstant: 1
18 <77> pushConstant: 2
19 <B0> send: +
20 <20> pushConstant: 3
21 <B8> send: *
22 <87> pop
23 <78> returnSelf


Did you already read Squeak by Example?


While its not really sample code, my video tutorial series, Squeak from the very start, may give you insights: http://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=viewall

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜