Navigation:  MCL Reference > Miscellaneous Functions >

Box( )

Print this Topic Previous pageReturn to chapter overviewNext page

Use the Box( ) function to store a value into a RaceMate storage box or return the latest value in the box. RaceMate have 7 storage boxes in total. If you omit the second argument, the function will return the value in the box specified by the first argument. Storage boxes are common in all views. That means once you store a value into a storage box, the value in it can be accessed in any other views. Values storage in a starter view can be accessed in a hist/stat view as well. Values in storage boxes will be kept until you quit RaceMate.

Please note that Box( ) can't be put inside a string. If you really want to use Box( ) in a string, you must precede it with a "&" sign.


Syntax 1 (outside strings)



Syntax 2 (in strings)






Indicate which box to be used. RaceMate have 7 storage boxes in total.


The value to be stored into the box specified by argument 1

eArg1,... eArg9

If eValueToStore is a character string, you may put template symbols @1, @2,... to @9 into eValueToStore. They will be replaced by eArg1, eArg2,... eArg9 in a one-one match basis in the return value. However the @1, @2... @9 template symbols will be kept in the storage box. If eValueToStore is omitted, the replacement will take place when returning the string in the storage box.



Data type of the value in the box specified by argument 1



Box(1, HrAge())

Put age of horse into storage box number 1



Return value in storage box number 4



Stores 'HrDaysAgo()+@1' into storage box number 3 but returns a string 'HrDaysAgo()+30'.



If string 'HrDaysAgo()+@1' is stored in the storage box, 'HrDaysAgo()+30' will be returned. However value in the storage box will not be changed by the replacement. Box(3) will still return 'HrDaysAgo()+@1'.


ListItem("He is Box(1,'John')|Paul", 1, "|")

In the example above, "Box(1, 'John')" will be regarded as a string. The function will return "He is Box(1, 'John')".


ListItem("He is &Box(1,'John')|Paul", 1, "|")

In the example above "&Box(1, 'John')" will carry out the feature of the Box() function. The function will return "He is John"。



Page url: