Structorizer.Desktop icon indicating copy to clipboard operation
Structorizer.Desktop copied to clipboard

Conversion from String to int

Open hans005 opened this issue 7 years ago • 5 comments

Would be nice to have a function for this conversion! Even better of course would be to have conversion from String to floating point as well :-)

Great program already though!!!

hans005 avatar May 28 '18 22:05 hans005

Integer.valueOf(some_string_variable) Float.valueOf(some_string_variable)

isn't that enough?

fesch avatar May 29 '18 05:05 fesch

OK, sorry, I did not understand the documentation of Structorizer! I did read that

Elements from Java and Pascal

As the executor is Java-based, it should understand most Java commands. Besides this, it has been designed to work with basic Pascal syntax.

but I thought it was only about flow control. Now I have to start to experiment what all from Java really works.

So thanks for your answer. It makes Structorizer even much more usefull for me :-) And my little suggestion trial can of course be closed.

hans005 avatar Jun 05 '18 11:06 hans005

@hans005

It makes Structorizer even much more usefull for me :-)

Yes but you should be aware that the Java-specific instructions won't be exportable to other languages. And some mechanisms and classes were shadowed in order to implement language-independent mechanisms like arrays and record types. On the other hand, not even all of the built-in functions and procedures for Structorizer can be translated sensibly to all offered export languages. But we hope to increase the coverage step by step.

codemanyak avatar Jun 05 '18 11:06 codemanyak

@codemanyak Do you intend to add internal conversion routines? If yes: please adjust the topic, if not: you may want to close this.

GitMensch avatar Sep 25 '18 12:09 GitMensch

@GitMensch As there is a workaround (as outlined in https://github.com/fesch/Structorizer.Desktop/issues/530#issuecomment-392655514) I haven't planned to do anything about it very soon but didn't want to discard this proposal, either. (One reason is that support for export is difficult.) So I leave it for later reassessment.

codemanyak avatar Sep 25 '18 12:09 codemanyak