Using the Caché ^%R Routine - InterSystems Documentation
Using the Caché ^%R Routine - InterSystems Documentation
Using the Caché ^%R Routine - InterSystems Documentation
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
LANGSET<strong>^%R</strong><br />
; set up <strong>the</strong> data<br />
Set namespace = "%CACHELIB"<br />
set languages = $LISTBUILD("ObjectScript",<br />
"DSM-11",<br />
"DTM",<br />
"",<br />
"",<br />
"DSM-VMS",<br />
"DSM-J",<br />
"DTM-J",<br />
"MSM",<br />
"Basic")<br />
; do it<br />
for routine = "%R.OBJ", "ArbitraryName.MAC", "SomeO<strong>the</strong>r.RTN"<br />
{<br />
Set code = $$LANG<strong>^%R</strong>(routine, namespace)<br />
If ($ISVALIDNUM(code))<br />
{<br />
Set lang = $LISTGET(languages, (code + 1), "")<br />
Set:(lang = "") lang = "Unknown"<br />
Write routine, " language: ", lang, !<br />
}<br />
Else<br />
{<br />
Write routine, ": invalid extension", !<br />
}<br />
}<br />
LANGSET<strong>^%R</strong><br />
LANGSET<strong>^%R</strong> (rtn, langmode)<br />
Parameters<br />
rtn<br />
langmode<br />
The name of <strong>the</strong> target routine.<br />
An indicator specifying <strong>the</strong> new language of <strong>the</strong> source.<br />
Description<br />
This function returns <strong>the</strong> value of <strong>the</strong> language encoding for <strong>the</strong> specified routine.<br />
Parameters<br />
rtn<br />
A string that specifies <strong>the</strong> name of <strong>the</strong> routine to be searched for.<br />
langmode<br />
An integer specifying <strong>the</strong> language that <strong>the</strong> statements of rtn are written in.<br />
<strong>Using</strong> <strong>the</strong> <strong>Caché</strong> <strong>^%R</strong> <strong>Routine</strong> 19