Skip to content
Property Value
Hex Value $BB53
Categories
Localizations
  • FR: GetCalc(

GetCalc(

Overview

Gets contents of variable on another TI-84 Plus CE and stores it to variable on the receiving TI-84 Plus CE. By default, the TI-84 Plus CE uses the USB port if it is connected. If the USB cable is not connected, it uses the I/O port.portflag=0 use USB port if connected;portflag=1 use USB port;portflag=2 use I/O port.(Ignored when program runs on the TI-84 Plus CE.)

Availability: Token only available from within the Basic editor.

Syntax

GetCalc(variable[,portflag])

Arguments

NameTypeOptional
variable
portflagYes

Location

prgm, I/O, 0:GetCalc(


Description

The GetCalc( command allows you to make multiplayer games, where two calculators communicate with each other across a link cable that is connected between them. The GetCalc( command can only receive one variable from another calculator, and the variable can be any variable (a real, list, matrix, string, etc.). The calculator doesn't exchange variable values when the variable is received, but instead replace the variable of the same name on the receiving calculator.

For the GetCalc( command to work correctly, the sending calculator must be in a preemptible state and it cannot be executing an assembly program. (The sending calculator is the one which is not executing the GetCalc( command.) The two main commands that you should use to ensure this are Pause and Menu(; however, any command that is waiting for user input will also work perfectly fine (such as Prompt and Input).

The GetCalc( command behaves a little differently in the older TI-83 models. If the sending calculator is idle with the Pause or Menu( command, it will automatically "press enter" when the receiving calculator executes GetCalc(. This can be frustrating when in a menu, because it prevents the user's opportunity to make a selection.

However, this can make real-time gaming more possible if used in conjunction with the Pause command. When the receiving calculator receives the variable, it could then execute the Pause command, while the sending calculator automatically exits the power-saving state and could then perform the GetCalc( command. All models after the TI-83 do not automatically exit their power-saving states.

Advanced Uses

The TI-84+ and TI-84+SE will use the USB port if it is connected to a USB cable, otherwise they will use the I/O port. However, you can specify which port you want to use by putting a number after the variable as GetCalc('s second argument: zero to use the USB port if connected to a USB cable, one to use the USB port without checking to see if it's connected, and two to use the I/O port.

See Also


Source: parts of this page were written by the following TI|BD contributors: burr, DarkerLine, GoVegan, jonbush, kg583, Myles_Zadok, Timtech.

History

Calculator OS Version Description
TI-83 0.01013 Added

Last update: September 30, 2023 15:38:51
Created: February 23, 2023 23:15:01
Authors: Adrien Bertrand