4 Replies - 3554 Views - Last Post: 30 December 2009 - 10:29 AM

#1 Delta_Echo   User is offline

  • D.I.C Addict

Reputation: 5
  • View blog
  • Posts: 722
  • Joined: 24-October 07

Polish Notation (Prefix)

Posted 26 December 2009 - 11:05 AM

I was wondering how you would seperate operands in a multiple-digit Prefix notation expression.
For example, how do you know if
+12344


means 123 + 44 or 12 + 344? What i am asking is how do you know when one operand ends and another begins?

This post has been edited by Delta_Echo: 26 December 2009 - 11:08 AM

Is This A Good Question/Topic? 0
  • +

Replies To: Polish Notation (Prefix)

#2 MadScientist305   User is offline

  • New D.I.C Head

Reputation: 6
  • View blog
  • Posts: 44
  • Joined: 26-December 09

Re: Polish Notation (Prefix)

Posted 26 December 2009 - 11:13 AM

You could use parenthesis to remove the ambiguity.
Was This Post Helpful? 0
  • +
  • -

#3 Delta_Echo   User is offline

  • D.I.C Addict

Reputation: 5
  • View blog
  • Posts: 722
  • Joined: 24-October 07

Re: Polish Notation (Prefix)

Posted 26 December 2009 - 11:55 AM

thanks, i see now. The tut is was reading told me it was uneccessary to use parenthesis or breackets.

thanx
Was This Post Helpful? 0
  • +
  • -

#4 KYA   User is offline

  • Wubba lubba dub dub!
  • member icon

Reputation: 3213
  • View blog
  • Posts: 19,241
  • Joined: 14-September 07

Re: Polish Notation (Prefix)

Posted 26 December 2009 - 02:27 PM

Could you use whitespace?

If the user inputs it in a certain order that would also remove any ambiguity.
Was This Post Helpful? 0
  • +
  • -

#5 dbasnett   User is offline

  • D.I.C Addict
  • member icon

Reputation: 125
  • View blog
  • Posts: 698
  • Joined: 01-October 08

Re: Polish Notation (Prefix)

Posted 30 December 2009 - 10:29 AM

Polish Notation

you should also look at Reverse Polish Notation
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1