EasyManuals Logo

Casio ClassPad 300 Programming Guide

Casio ClassPad 300
125 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #115 background imageLoading...
Page #115 background image
The first function, BMCSSearchVariable(), searches for an exact match of the variable
name that you pass in. The second and third both perform partial matches. Notice that
BMCSSearchVal3() takes a VALMANSTRUCT reference as a parameter. In this case,
it is important that you know and understand the structure of a variable in MCS before
trying to use the function.
The following is an example that uses all three search functions as well as both the copy
and move function:
UCHAR attr, temp;
OBCD dat;
Cal_setn_OBC(5,&dat);
// Create x=5 in folder main
BMCSCreateVariable((CP_CHAR*)"main", (CP_CHAR*)"x", IMU_MCS_TypeReal,
sizeof(OBCD), (UCHAR*)&dat);
// Create folder test
BMCSCreateFolder((CP_CHAR*)"test", &temp);
// Copy x to test
BMCSCopyVariable((CP_CHAR*)"main", (CP_CHAR*)"x", (CP_CHAR*)"test",
(CP_CHAR*)"copied x");
// Move x to test
BMCSMoveVariable((CP_CHAR*)"main", (CP_CHAR*)"x", (CP_CHAR*)"test",
(CP_CHAR*)"moved x");
// Search using the first search function. This function returns the
// address of the variable if found.
UCHAR *ucDataTopAddress;
DWORD dwDataSize;
UCHAR *pucManTopAdr;
UCHAR ucValType;
if(BMCSSearchVariable((CP_CHAR*)"test",(CP_CHAR*)"moved x",
&ucValType,&pucManTopAdr, (UCHAR **)&ucDataTopAddress, &dwDataSize)!=0)
{
// not found!
}
else
{
// Create a variable using the address from the search function
BMCSCreateVariable((CP_CHAR*)"test",(CP_CHAR*)"found x1",
IMU_MCS_TypeReal,dwDataSize, (UCHAR *)&pucManTopAdr);
}
// The second search function returns the name of the found variable
// in a CP_CHAR buffer
CP_CHAR buffer[100];
if(BMCSSearchVal2((CP_CHAR*)"test",(CP_CHAR*)"moved ", buffer, 5) != 0)
{
// not found!
}
115

Table of Contents

Other manuals for Casio ClassPad 300

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Casio ClassPad 300 and is the answer not in the manual?

Casio ClassPad 300 Specifications

General IconGeneral
BrandCasio
ModelClassPad 300
CategoryCalculator
LanguageEnglish

Related product manuals