Menu

Build a Calculator in Ovie Lang, Learning the oya Keyword
πŸ“°

Build a Calculator in Ovie Lang, Learning the oya Keyword

DEV CommunityΒ·Ovie langΒ·about 6 hours ago
#GxkQ6nOe
#devcommunity#dev#seeam#return#ovie
Reading 0:00
15s threshold

Ovie is a systems programming language that borrows natural language patterns. One of the keywords that sets it apart is oya β€” Ovie's word for immutable variable declaration.

This tutorial builds an interactive calculator step by step, introducing oya as we go.

Setup

You need Ovie installed. On Windows:

Run as Administrator

iwr -useb https://raw.githubusercontent.com/Ovie-Lang/ovie/main/easy-windows-install.ps1 | iex

Or build from source:

git clone https://github.com/Ovie-Lang/ovie.git

cd ovie

cargo build --release --bin oviec

Verify:

oviec --version

Step 1: Print something

Create calculator.ov:

seeAm "OVIE CALCULATOR"

Run it:

oviec run calculator.ov

seeAm is Ovie's print β€” from Nigerian Pidgin English for "see for yourself."

Step 2: Add oya constants

Now let us add the fixed strings our calculator needs.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.