The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Want some C Syntax with that Smalltalk?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Want some C Syntax with that Smalltalk? Posted: Jul 17, 2006 12:57 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Want some C Syntax with that Smalltalk?
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

Our partner Georg Heeg has put together an interesting little package in the public store repository - you can show existing smalltalk code in a pseudo-C syntax. It's read-only (i.e., you can't write code in it) - but possibly interesting for newbies. Load it in, and have a look at the new tab that appears in the browser when you select a method. Here's an example - first, Smalltalk code:


cstDelete
	"delete Item on server"
 
	| destination |
	destination := self getDeleteURL.
	self validatePost
		ifFalse: [^self message: (UserMessage defaultString: 'You did not enter a username and/or password' key: #postingToolUserValidationMessage2) asString].
	^self postDeleteTo: destination

And the matching C-like stuff:


ANY cstDelete (void)
	/*delete Item on server*/
 {
	ANY destination;
	destination = self -> getDeleteURL();
	self -> validatePost() -> ifFalse:(((void) {
			return self -> message:(UserMessage -> defaultString:key:("You did not enter a username and/or password", S"postingToolUserValidationMessage2") -> asString())});
	return self -> postDeleteTo:(destination)}

Read: Want some C Syntax with that Smalltalk?

Topic: Noticing the Bad Previous Topic   Next Topic Topic: Nightmares and Dreamscapes

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use