Code Monkey home page Code Monkey logo

learn-brightscript's Introduction


/BrightScript_1.png

Learning BrightScript

I am not too experienced with BrightScript at the moment. This document will go over my knowledge of the BrightScript language so far.

This document used version ? of the BrightScript programming language.

Comments in BrightScript

Comments in BrightScript are the same as comments in languages like VB.NET, etc.

' This is a single line comment
' BrightScript does not support multi-line comments (as far as I know)

/!\ This example has not been tested yet, and may not work

Break keyword in BrightScript

BrightScript does NOT support the break keyword.

To this day, I am still not entirely sure what the break keyword does, but most languages support it.

/!\ This example has not been tested yet, and may not work

Hello World in BrightScript

A hello world program in BrightScript is a bit complicated It is not similar to any language I am currently familiar with.

Function helloWorld(msgPort As Object, userVariables As Object, bsp as Object)
	print "Hello World"
End Function

/!\ This example has not been tested yet, and may not work

Functions in BrightScript

Functions work like so in BrightScript

function myFunction1(msgPort As Object, userVariables As Object, bsp as Object)
	print "My function has functioned"
End Function

I am not sure what the msgPort As Object, userVariables As Object, bsp as Object does, I don't have any way of testing these programs, and this is the piece I took with me.

/!\ This example has not been tested yet, and may not work

Booleans in BrightScript

Booleans are defined like so in BrightScript:

boolean isTrue = true;
boolean isFalse = false;

/!\ This example has not been tested yet, and may not work

Return a function in BrightScript

Returning a function in BrightScript is simple:

function myFunction2(msgPort As Object, userVariables As Object, bsp as Object)
	print "My function has functioned"
End Function
return myFunction2()

/!\ This example has not been tested yet, and may not work

Source

The majority of my BrightScript knowledge comes from self-experimentation, VB.NET syntax comparisons, and these reposories:

BrightSign/BrightScript-Samples

BrightSign/BrightAuthor-Plugins

BrigthSign/BrigtSign BLE-Commands

Other knowledge of BrightScript

  1. BrightScript is not curly bracket and semicolon language

  2. I began learning BrightScript with a new Roku TV I got for Christmas in 2020. Most of my knowledge comes from experimenting with Visual Basic DOT NET syntax, as they both have similar syntax

  3. BrightScript is the language Roku uses for their TV monitors.

  4. BrightScript uses the .brs file extension

  5. BrightScript is a language recognized by GitHub

  6. I don't know if BrightScript is an open source language or not

  7. No other knowledge of BrightScript at the moment.


File version: 1 (2022, Thursday, April 14th at 10:00 pm PST)


learn-brightscript's People

Contributors

seanpm2001 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

seanwallawalla

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.