{"id":28612826,"url":"https://github.com/unoplatform/rpncalculator","last_synced_at":"2025-06-12T00:39:53.820Z","repository":{"id":36404052,"uuid":"206617781","full_name":"unoplatform/RpnCalculator","owner":"unoplatform","description":"The Xamarin.Forms RPN (Reverse Polish Notation) calculator running in WebAssembly","archived":false,"fork":false,"pushed_at":"2023-01-16T10:01:47.000Z","size":1164,"stargazers_count":10,"open_issues_count":12,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-03-11T20:49:27.842Z","etag":null,"topics":["csharp","first-timers-friendly","mono","sample","uno","uno-platform","wasm","webassembly","xamarin","xamarin-forms"],"latest_commit_sha":null,"homepage":"https://rpncalculator-wasm.azurewebsites.net/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unoplatform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-05T17:14:01.000Z","updated_at":"2022-06-14T06:11:02.000Z","dependencies_parsed_at":"2023-01-17T01:10:53.842Z","dependency_job_id":null,"html_url":"https://github.com/unoplatform/RpnCalculator","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/unoplatform/RpnCalculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unoplatform%2FRpnCalculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unoplatform%2FRpnCalculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unoplatform%2FRpnCalculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unoplatform%2FRpnCalculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unoplatform","download_url":"https://codeload.github.com/unoplatform/RpnCalculator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unoplatform%2FRpnCalculator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259372669,"owners_count":22847792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","first-timers-friendly","mono","sample","uno","uno-platform","wasm","webassembly","xamarin","xamarin-forms"],"created_at":"2025-06-12T00:39:53.092Z","updated_at":"2025-06-12T00:39:53.795Z","avatar_url":"https://github.com/unoplatform.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\nname: Xamarin.Forms - RPN Calculator\ndescription: An RPN (Reverse Polish Notation) calculator allows numbers and operations to be entered without parentheses or an equal key. RPN (also called...\npage_type: sample\nlanguages:\n- csharp\nproducts:\n- xamarin\nurlFragment: rpncalculator\n---\n# RPN Calculator\n\nAn RPN (Reverse Polish Notation) calculator allows numbers and operations to be entered without parentheses or an equal key. RPN (also called postfix notation) is described in the Wikipedia article [**Reverse Polish notation**](https://en.wikipedia.org/wiki/Reverse_Polish_notation) and the [**RPN Calculator**](https://github.com/xamarin/Workbooks/blob/master/xamarin-forms/advanced/RPNCalculator/RpnCalculator-ios.workbook) workbook, which shows an alternative approach to coding an RPN calculator for Xamarin.Forms.\n\nRPN is based on a stack. Numbers are pushed on the stack by pressing the ENTER key. Unary operations (such as **log** and **sin**) pop a number from the stack, apply the operation, and push the result back on the stack. Binary operations (such as **+** and **/**) pop two numbers from the stack, perform the operation, and push the result on the stack.\n\nTo perform the calculation\n\n5 \u0026#x00D7; (3 + 4) \u0026#x2013; 2\n\npress the following keys:\n\n5 ENTER 3 ENTER 4 ENTER + \u0026#x00D7; 2 ENTER \u0026#x2013;\n\nThe + operation adds 3 and 4, the times operation multiplies 5 and that result, and the minus operation subtracts 2 from that result.\n\nThe layout of the keys appears twice in the **MainPage.xaml** file, separately for portrait mode and landscape mode. The **MainPage.xaml.cs** code-behind file switches between these two layouts based on the relative width and height of the page.\n\nThe calculator logic is encapsulated in the **RpnCalculatorViewModel.cs** file. The XAML file and the ViewModel are linked through XAML-based data bindings, which are described in detail in the series of series of articles on [**Data Binding**](https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/data-binding/), and particularly the [**The Command Interface**](https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/data-binding/commanding) article.\n\n![RPN Calculator application screenshot](Screenshots/01Portrait.a.png \"RPN Calculator application screenshot\")\n\n## Author\n\nCharles Petzold\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funoplatform%2Frpncalculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funoplatform%2Frpncalculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funoplatform%2Frpncalculator/lists"}