11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

System and Other FunctionsNote that the $ZCYC value of an 8-bit string is identical to the $ZCRC mode 1 value.ParametersstringA string. Can be specified as a value, a variable, or an expression. String values are enclosedin quotation marks.ExampleIn this example, the first $ZCYC returns 65; the second returns 3; and the third returns 64.SET x= $ZCYC("A"); 1000001 (only one character; no XOR )SET y= $ZCYC("AB"); 1000001 XOR 1000010 -> 0000011SET z= $ZCYC("ABC"); 1000001 XOR 1000010 -> 0000011 | 1000011 -> 100000WRITE !,"x=",x," y=",y," z=",zSee Also• $ZCRC function$ZFInvokes non-<strong>Caché</strong> <strong>ObjectScript</strong> programs or functions from <strong>Caché</strong> <strong>ObjectScript</strong> routines.$ZF("function_name",args)Parametersfunction_nameargsThe name of the function you want to call.Optional — A set of argument values passed to the function.DescriptionThe various forms of the $ZF function allow you to invoke non-<strong>Caché</strong> <strong>ObjectScript</strong> programs(such as shell or operating system commands) or functions from <strong>Caché</strong> <strong>ObjectScript</strong> routines.You can define interfaces or links to functions written in other languages into <strong>Caché</strong> and callthem from <strong>Caché</strong> <strong>ObjectScript</strong> routines using $ZF.$ZF can also be used to:528 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!