I have a problem with my pseudocode:

Declare Integer p1
Declare Integer p2
Declare Integer p3

For p1 = 1 To 3
For p2 = 65 To 66
For p3 = 6 To 8
Display p1, p2, p3
End For
End For
End For

This would display 18 combinations. But, I want to convert and display the character code (in this case 65 and 66) to the character. So instead of "1658", I want it to be "1A8". How can I fix this? I've tried putting ToChar with p2 (Display p1, p2, ToChar(65), ToChar(66), p3), but no avail. Please help!

Thanks!

I'm not that well versed in pseudocode but could you declare P2 as a Char and run the For loop from 'A' to 'B'?

I can't count from 'A' to 'B' in the loop. That's also why I'm using the ASCII of 'A' and 'B'. So, now I need to convert it to its character but somehow display it in place of 'A' and 'B'.

Can you pass p2 to the ToChar function, instead of a literal number?

Display p1,ToChar(p2), p3

That worked! Wow, I had no idea...Thanks!

You are no longer in the world of pseudocode with this question. Converting/displaying is going to be software-specific. I actually took the time to install this Flowgorithm software. If there is an option to directly copy/paste the code you posted and run it, I don't see it. Looks like you have to create (from scratch) the program via GUI/flowchart using Flowgorithm to recreate what you are doing. What you need to do, therefore, is not just copy/paste the code. You need to save it and copy/paste the xml from that saved file. The "frpg" file format appears to be plain-old XML and that is what Flowgorithm uses to do things, NOT the code you posted. It's a lot of effort on our part to do that, but it's even more effort on our part to try to reverse-engineer the code you posted into a flowchart. To re-iterate, unless I am missing something, it is impossible to take someone's Flowgorithm code and create the flowchart. So again, you need to post more than the code if you want something that anyone else can run. You need to post the XML. For that reason, if it is at all possible, I would ditch Flowgorithm if you are trying to learn to code. You need to be able to directly access code to get anything done. This is truly a pseudocode program only, not a language.

So the only advice for your problem is to consult the documentation. Scroll down to "Data Type Conversion". I'm guessing either ToString or ToChar is your answer. Seems like you've tried ToChar already. This is speculation, as mentioned, since I see no way to take your code and run it, WITHOUT creating the flowchart step-by-step graphically.

http://www.flowgorithm.org/documentation/intrinsic-functions.htm

Whoops. Guess I was writing this while you were marking it solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.