Charm question
Stephan Kleinert (2271) 70 posts |
Hi all, last weekend, I decided to set myself a little challenge and learn some Charm programming. Since I wanted to see something happening on the screen, I started with the forest fire model. Then, I wanted to improve the demo by letting the user input the basic parameters of the simulation… and was mildly astonished that I could find no documentation about how to do simple keyboard input in Charm. Sure there’s the ‘in’ library, but there’s no hint anywhere how it’s supposed to work with stdin. Sooo… are there any Charm programmers here who could help me out here? I tried to contact the author, but so far he hasn’t answered… Kind regards and thanks in advance, |
Rick Murray (539) 13840 posts |
Google found this – https://www.amazon.co.uk/dp/B00DGNQO8U |
Stephan Kleinert (2271) 70 posts |
Yes, sure, and I bought it yesterday. I’m all for giving the developer appreciation for his efforts – so having bought this book is no problem for me, but I’m sorry to say that it’s not a very thorough guide. Personally I regard basic input/output an essential topic for a language manual, but strangely, there are no answers to my question in there. I wouldn’t ask here if I hadn’t tried everything else. |
Rick Murray (539) 13840 posts |
Sorry, you hadn’t made it clear what you had it hadn’t read. I’m on break now so three minutes of looking for me this: http://charm.qu-bit.co.uk/ Click on Runtime, then choose the riscos library. It’s in there. ;-) But, yeah, could have been clearer… |
Mike Freestone (2564) 131 posts |
earlier it was mentioned that Peter Nowosad may have died which was a surprise to me |
Stephan Kleinert (2271) 70 posts |
Rick: Thanks for your help! I read the “runtime → riscos library” section on the Charm homepage, too; but what’s in there only covers reading a single key and not what one can do with, say, OS_ReadLine. Ok, I’m really starting to think I should have made myself clearer; I wanted to read in four numbers without re-inventing the wheel or writing inline assembly to call OS_ReadLine. Anyway, in the light of Mike’s news, all these problems pale and go away :( Mike: :( :( :( That’s very sad. My sincerest condolences to family and friends :( |
Rick Murray (539) 13840 posts |
Is there a way to make SWI calls? |
Stephan Kleinert (2271) 70 posts |
Yes, both things are possible. SWI calls can be made via inline assembler, and the library source is also there. I’ll give it a try this weekend… |