Previous page Next page Navigation bar

Calculator Programming Tutorial

Programming Building Blocks I

Expressions

String Operators

Both Visual Basic for Applications and JavaScript permit variables to have the string datatype. While conversion from strings to other data types is possible (both VBA and JavaScript can be convinced to interpret a string of digits as a number, for example), there are also operations that can be performed directly on strings. The only such operation widely implemented is string concatenation — appending the contents of one string to the contents of another string.

In JavaScript, the string concatenation operator is +. In VBA, the string concatenation operator is &. Thus, for example, the JavaScript statement:

var a = "This is the life" + " of Reily."

is equivalent to the statement:

var a = "This is the life of Reily."

Providing a string concatenation operator for the calculator is impossible, as there are no string variables or expressions in the calculator. (The calculator does support what look like string constants, but these are in fact commands to echo the characters onto the display.)

[ Previous page | Top of page | Next page ]

Previous page Top of page Next page Navigation bar

Copyright © 2002 Brian Hetrick
Page last updated 13 January 2002.

Brian’s Casio Calculator Corner

Home

Programs

Tutorial

Preface

Introduction

Fundamentals

Building Blocks I

Introduction

Comments

Data Types

Numbers

Variables

Expressions

Introduction

Arithmetic

Grouping

Relational

Logical

Bitwise

String

Side Effect

Functions

Control Flow I

Control Flow II

Subprograms

Basic I/O

Algorithms

A First Program

Examples

Exercises

Answers

Modularization

Data Structures I

Recursion

Program Attributes

Building Blocks II

Algorithm Analysis

Structuring

Data Structures II

Abstract Types

Objects

Problem Analysis

Reference Card

References

Puzzles

Site Information

Your Privacy

Site Map

E-mail

Site Technical Data