www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Parsing

reply "Joel" <joelcnz gmail.com> writes:
I've got a program that uses user input, but I'm having trouble 
with it.

Here's an example, the unenclosed numbers (1 2 3 in example) add 
entries:

0 Achievement
1 2 3 c"Won!" st"4 5 6" <- user input

(create 3 entries all with st"4 5 6")

0 Achievement
1 house [4, 5, 6]
2 rock [4, 5, 6]
3 mouse [4, 5, 6]

c"mud" <- user input

0 Achievement
1 house [4, 5, 6] mud
2 rock [4, 5, 6] mud
3 mouse [4, 5, 6] mud

So add the entries and while they are still hot, you can edit 
them.

I don't know if this an impossible ask for help, but I though I 
might get some help. I'll keep going over my code to work it out.

Thanks.
Mar 30 2014
parent reply Marco Leise <Marco.Leise gmx.de> writes:
Am Mon, 31 Mar 2014 04:06:38 +0000
schrieb "Joel" <joelcnz gmail.com>:

 I've got a program that uses user input, but I'm having trouble 
 with it.
 
 Here's an example, the unenclosed numbers (1 2 3 in example) add 
 entries:
 
 0 Achievement
 1 2 3 c"Won!" st"4 5 6" <- user input
 
 (create 3 entries all with st"4 5 6")
 
 0 Achievement
 1 house [4, 5, 6]
 2 rock [4, 5, 6]
 3 mouse [4, 5, 6]
 
 c"mud" <- user input
 
 0 Achievement
 1 house [4, 5, 6] mud
 2 rock [4, 5, 6] mud
 3 mouse [4, 5, 6] mud
 
 So add the entries and while they are still hot, you can edit 
 them.
 
 I don't know if this an impossible ask for help, but I though I 
 might get some help. I'll keep going over my code to work it out.
 
 Thanks.
So what is the question? -- Marco
Mar 31 2014
parent reply "Joel" <joelcnz gmail.com> writes:
On Monday, 31 March 2014 at 17:25:58 UTC, Marco Leise wrote:
 Am Mon, 31 Mar 2014 04:06:38 +0000
 schrieb "Joel" <joelcnz gmail.com>:

 I've got a program that uses user input, but I'm having 
 trouble with it.
 
 Here's an example, the unenclosed numbers (1 2 3 in example) 
 add entries:
 
 0 Achievement
 1 2 3 c"Won!" st"4 5 6" <- user input
 
 (create 3 entries all with st"4 5 6")
 
 0 Achievement
 1 house [4, 5, 6]
 2 rock [4, 5, 6]
 3 mouse [4, 5, 6]
 
 c"mud" <- user input
 
 0 Achievement
 1 house [4, 5, 6] mud
 2 rock [4, 5, 6] mud
 3 mouse [4, 5, 6] mud
 
 So add the entries and while they are still hot, you can edit 
 them.
 
 I don't know if this an impossible ask for help, but I though 
 I might get some help. I'll keep going over my code to work it 
 out.
 
 Thanks.
So what is the question?
Oh, how do I parse the example? So that entries are added and values are set. I'm not sure how to explain it.
Mar 31 2014
parent "Joel" <joelcnz gmail.com> writes:
Oops, the 'c"Won!"' shouldn't be there, I forgot to use it.

On Monday, 31 March 2014 at 19:23:17 UTC, Joel wrote:
 On Monday, 31 March 2014 at 17:25:58 UTC, Marco Leise wrote:
 Am Mon, 31 Mar 2014 04:06:38 +0000
 schrieb "Joel" <joelcnz gmail.com>:

 I've got a program that uses user input, but I'm having 
 trouble with it.
 
 Here's an example, the unenclosed numbers (1 2 3 in example) 
 add entries:
 
 0 Achievement
 1 2 3 c"Won!" st"4 5 6" <- user input
 
 (create 3 entries all with st"4 5 6")
 
 0 Achievement
 1 house [4, 5, 6]
 2 rock [4, 5, 6]
 3 mouse [4, 5, 6]
 
 c"mud" <- user input
 
 0 Achievement
 1 house [4, 5, 6] mud
 2 rock [4, 5, 6] mud
 3 mouse [4, 5, 6] mud
 
 So add the entries and while they are still hot, you can edit 
 them.
 
 I don't know if this an impossible ask for help, but I though 
 I might get some help. I'll keep going over my code to work 
 it out.
 
 Thanks.
So what is the question?
Oh, how do I parse the example? So that entries are added and values are set. I'm not sure how to explain it.
Mar 31 2014