Skip to content

Latest commit

 

History

History
179 lines (137 loc) · 2.9 KB

README.md

File metadata and controls

179 lines (137 loc) · 2.9 KB

blvd

Introducing Blvd: A Cinematic Approach to Programming

Whether you are a Los Angeles native, visitor, or admirer, it's likely that you are familiar with the city's iconic entertainment destinations. Many of which are linked to the famous Sunset Boulevard.

Blvd is a statically-typed programming language whose syntax is influenced by movie scripts. With its simple design, Blvd allows you to be the creative director of your own programming projects.

Blvd is brought to you by Gabrielle Barnes, Funmi Idowu, and Kimberly Kubo.

Our language website is available here: blvd

Language Overview:

Features:

  • .blvd file extension
  • parentheses can change the precedence of operators
  • static, manifest typing
  • data structures similar to lists
  • reads like a script

Comments:

blvdJavaScript

(note: take a drive through Sunset Blvd!)

//take a drive through Sunset Blvd!

Example Programs:

Hello World

blvdJavaScript

say "Hello, World!"--

console.log("Hello, World!")

Variable Declaration

blvdJavaScript

CAST string actor as "lead"--

let actor = "lead"

Assignment Statement

blvdJavaScript

RECAST x as x + 1--

x = x + 1

Functions

blvdJavaScript
SCENE string getFreeway has string fwy: CAST string fwy1 as "405"-- EXIT WITH fwy1-- END SCENE function getFreeway(fwy){ let fwy1 = "405" return fwy1 }

Loops

blvdJavaScript
ACTION number stars in range from 1, 6: say stars-- CUT for(let stars = 1; stars < 6; stars++){ console.log(stars) }
CAST number rating as 1-- PERFORM rating <= 5: say "less than 5 stars"-- let rating = 1 while(rating <= 5){ console.log(rating) }

Conditionals

blvdJavaScript
NOMINATE review is 1: say "1 Star"-- RUNNER-UP review is 2: say "2 Stars"-- SUPPORTING: say "3 or more stars"-- if(review == 1) { console.log("1 Star") } else if(review == 2){ console.log("2 Star") } else { console.log("3 or more stars") }