f



Why does $TEXT() not return text?

I am looking at a file I have created named TMGUSRI2.m
This is with GT.M 6.2-002A

Here is a stat of the .m file and the .o file

kdt0p@poweredge:/opt/worldvista/EHR/p$ stat TMGUSRI2.m
  File: `TMGUSRI2.m'
  Size: 19171           Blocks: 40         IO Block: 4096   regular file
Device: 821h/2081d      Inode: 705008      Links: 1
Access: (0744/-rwxr--r--)  Uid: ( 1000/   kdt0p)   Gid: ( 1000/   kdt0p)
Access: 2015-08-10 20:50:51.000000000 -0400
Modify: 2015-06-23 20:23:12.000000000 -0400
Change: 2015-06-23 20:23:11.000000000 -0400
 Birth: -

kdt0p@poweredge:/opt/worldvista/EHR/p$ stat ../o/TMGUSRI2.o
  File: `../o/TMGUSRI2.o'
  Size: 29670           Blocks: 64         IO Block: 4096   regular file
Device: 821h/2081d      Inode: 934953      Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/   kdt0p)   Gid: ( 1000/   kdt0p)
Access: 2015-08-10 08:17:00.000000000 -0400
Modify: 2015-07-27 18:38:10.000000000 -0400
Change: 2015-07-27 18:38:10.000000000 -0400
 Birth: -
kdt0p@poweredge:/opt/worldvista/EHR/p$

Notice that the .o file is newer than the .m file.  This is because when I =
upgraded my version of GT.M, I compiled all the routines into new .o files.

From GT.M, I can enter ZEDIT "TMGUSRI2" and the editor will bring up the ro=
utine for editing."

But $TEXT() does not return anything
--------------------
ASTRON>w $TEXT(^TMGUSRI2)

ASTRON>
---------------------

If I do a ZPRINT I get a warning about object module and source module not =
matching
--------------------
ASTRON>ZPRINT ^TMGUSRI2:+2
%GTM-I-TXTSRCMAT, M object module and source file do not match

TMGUSRI2 ;TMG/kst/SACC-compliant USER INTERFACE API FUNCTIONS ;7/27/13, 2/2=
/14
         ;;1.0;TMG-LIB;**1,17**;07/17/12

ASTRON>
--------------------

I am not sure how the mismatch state occurred. But with the GT.M upgrade an=
d moving files and manual compiles from the Linux prompt, I am not surprise=
d--though I wish I understood how it happened.

In the past, when I encountered this problem, I would just ZLINK the source=
 file, and it would be fixed.  But now, since the .o file is newer, this do=
esn't do anything.

Questions:
1) Why does $TEXT() not return text, but ZPRINT does?  I suspect it is rela=
ted to the mismatch between .m and .o file.  Actually I found this answer: =
 The manual states:
----------------
If $TEXT() cannot access the source file for the current object, either bec=
ause it is not in the location from which it was compiled or because the pr=
ocess does not have access to some piece of the path to the source, or if t=
he located source does not match the object currently in use by the process=
, $TEXT() returns an empty string.
----------------

2) How would one find all such mis-matches?  I tried a oneliner to do a ZP =
on all TMG* entries.   The following code will print out all the names, but=
 won't show the first line.  I don't think ZP works with indirection.  Is t=
his correct?

s n=3D"TMG" f  s n=3D$o(^DIC(9.8,"B",n)) q:n'["TMG"  w n,! zp @("^"_n):+1

3) How can this be fixed?  I know that I can force compile all the TMG*.m r=
outines from the Linux prompt by calling mumps for each one. But is there a=
 better way?  I can edit the file, making the .m newer, and then ZLINK.  Bu=
t that is time intensive.

NOTE: I just found a solution, I think.  From the command line, I did this:
for i in $(ls -1 TMG*.m) ; do touch $i ; done

This made the .m files newer than the .o files.  It seems to have worked.

Weird....

Kevin
0
kdtop
8/11/2015 1:48:03 AM
comp.lang.mumps 1621 articles. 0 followers. Post Follow

1 Replies
997 Views

Similar Articles

[PageSpeed] 40

On Monday, August 10, 2015 at 9:48:04 PM UTC-4, kdtop wrote:
> I am looking at a file I have created named TMGUSRI2.m
> This is with GT.M 6.2-002A
>=20
> Here is a stat of the .m file and the .o file
>=20
> kdt0p@poweredge:/opt/worldvista/EHR/p$ stat TMGUSRI2.m
>   File: `TMGUSRI2.m'
>   Size: 19171           Blocks: 40         IO Block: 4096   regular file
> Device: 821h/2081d      Inode: 705008      Links: 1
> Access: (0744/-rwxr--r--)  Uid: ( 1000/   kdt0p)   Gid: ( 1000/   kdt0p)
> Access: 2015-08-10 20:50:51.000000000 -0400
> Modify: 2015-06-23 20:23:12.000000000 -0400
> Change: 2015-06-23 20:23:11.000000000 -0400
>  Birth: -
>=20
> kdt0p@poweredge:/opt/worldvista/EHR/p$ stat ../o/TMGUSRI2.o
>   File: `../o/TMGUSRI2.o'
>   Size: 29670           Blocks: 64         IO Block: 4096   regular file
> Device: 821h/2081d      Inode: 934953      Links: 1
> Access: (0664/-rw-rw-r--)  Uid: ( 1000/   kdt0p)   Gid: ( 1000/   kdt0p)
> Access: 2015-08-10 08:17:00.000000000 -0400
> Modify: 2015-07-27 18:38:10.000000000 -0400
> Change: 2015-07-27 18:38:10.000000000 -0400
>  Birth: -
> kdt0p@poweredge:/opt/worldvista/EHR/p$
>=20
> Notice that the .o file is newer than the .m file.  This is because when =
I upgraded my version of GT.M, I compiled all the routines into new .o file=
s.
>=20
> From GT.M, I can enter ZEDIT "TMGUSRI2" and the editor will bring up the =
routine for editing."
>=20
> But $TEXT() does not return anything
> --------------------
> ASTRON>w $TEXT(^TMGUSRI2)
>=20
> ASTRON>
> ---------------------
>=20
> If I do a ZPRINT I get a warning about object module and source module no=
t matching
> --------------------
> ASTRON>ZPRINT ^TMGUSRI2:+2
> %GTM-I-TXTSRCMAT, M object module and source file do not match
>=20
> TMGUSRI2 ;TMG/kst/SACC-compliant USER INTERFACE API FUNCTIONS ;7/27/13, 2=
/2/14
>          ;;1.0;TMG-LIB;**1,17**;07/17/12
>=20
> ASTRON>
> --------------------
>=20
> I am not sure how the mismatch state occurred. But with the GT.M upgrade =
and moving files and manual compiles from the Linux prompt, I am not surpri=
sed--though I wish I understood how it happened.
>=20
> In the past, when I encountered this problem, I would just ZLINK the sour=
ce file, and it would be fixed.  But now, since the .o file is newer, this =
doesn't do anything.
>=20
> Questions:
> 1) Why does $TEXT() not return text, but ZPRINT does?  I suspect it is re=
lated to the mismatch between .m and .o file.  Actually I found this answer=
:  The manual states:
> ----------------
> If $TEXT() cannot access the source file for the current object, either b=
ecause it is not in the location from which it was compiled or because the =
process does not have access to some piece of the path to the source, or if=
 the located source does not match the object currently in use by the proce=
ss, $TEXT() returns an empty string.
> ----------------
>=20
> 2) How would one find all such mis-matches?  I tried a oneliner to do a Z=
P on all TMG* entries.   The following code will print out all the names, b=
ut won't show the first line.  I don't think ZP works with indirection.  Is=
 this correct?
>=20
> s n=3D"TMG" f  s n=3D$o(^DIC(9.8,"B",n)) q:n'["TMG"  w n,! zp @("^"_n):+1
>=20
> 3) How can this be fixed?  I know that I can force compile all the TMG*.m=
 routines from the Linux prompt by calling mumps for each one. But is there=
 a better way?  I can edit the file, making the .m newer, and then ZLINK.  =
But that is time intensive.
>=20
> NOTE: I just found a solution, I think.  From the command line, I did thi=
s:
> for i in $(ls -1 TMG*.m) ; do touch $i ; done
>=20
> This made the .m files newer than the .o files.  It seems to have worked.
>=20
> Weird....
>=20
> Kevin

$TEXT() returns a null string when it cannot find requested source code (I =
believe this is defined by the standard). As a debugging tool, ZPRINT repor=
ts an error when it cannot find requested source code.

When GT.M compiles source code, it embeds the location of the source file i=
n the object file. When source code is not embedded in object code, $TEXT()=
 and ZPRINT use this embedded location of the source file to find source co=
de. When you moved files, I suspect the path to the source files changed. $=
TEXT() and ZPRINT also use checksums to determine whether the source file h=
as changed, even if the path remains the same.

With the -embed_source option of the mumps command, you can tell GT.M to em=
bed the actual source code in the object files. $TEXT() and ZPRINT use that=
 embedded source code, and are immune to moving the source file, or replaci=
ng it with a newer source. You can use the $ZCOMPILE intrinsic special vari=
able to pass flags for use when dynamically compiling code.

Note that embedding source code in object files makes them correspondingly =
larger.

-[no]embed_source and other potentially interesting qualifiers of the mumps=
 command are described in Chapter 3 (Development Cycle) of the GT.M Program=
mers Guide

Regards
-- Bhaskar
0
K
8/17/2015 2:24:16 PM
Reply:

Similar Artilces:

text-text
Wondering how what I input to my UTF-8 terminal gets passed along through my patched [1] trn ... Cyrillic: А Б В Г Д Е Ж З И Й К Л М Н О П а б в г д е ж з и й к л м н о п IPA: ᴀ ᴁ ᴂ ᴃ ᴄ ᴅ ᴆ ᴇ ᴈ ᴉ ᴊ ᴋ ᴌ ᴍ ᴎ ᴏ ɀ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ ɍ Ɏ ɏ [1] https://groups.google.com/d/msg/comp.sys.raspberry-pi/7Z37Hdrm0DM/6aqD-reXFzAJ ...

text + text
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do this. And MS SQL Server too, I think (CMIIW). -- dave ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org Am Freitag, 8. Oktober 2004 12:57 schrieb David Garamond: > What is "text + text" supposed to do right now? Nothing. > What a...

Surrounding text with text
I was wondering if it was possible to surround a text body with text like so: +--------------+ |ABCDEFGHIJKLM | |H N| |A Main Body O| |L Text goes P| |B here Q| |-=+_ZYXWVUTSR | | | | | | | | | +--------------+ This seems far-fetched, but just curious. I suppose that I could just move stuff around by hand in the GIMP later on, but there's probably a {better,more {extensible,clean}} way of doing it from (La)TeX. -FreeSmith ptjm@interlog.com (Patrick TJ McPhee) wrote in message news:<bffbhe$per$1@news.eusc.inter...

Pages
I have a titel-textfield over a pic (headline) , text is black, background for text transparent. A second textfield should overlapp the first textline..... When i arrange the second field with the same settings like the first, the first text disappear... How can i do, that the second text overpapps the first, all over the pic. Any help appreciated! Thanks for replies! I am german and hope that the engish speaking people understand my problem! Soory! Gerd In article <611db9e2-b085-4fe5-907a-ca714b0c32dd@m74g2000hsh.googlegroups.com>, hurlebaus <gerd.schenk@freenet.de> wrote:...

text 2 text
I'm rather new to ustation and am having trouble finding replacements for all of my Acad lisp routines. One that I'd like to find changes a selected text string to read like the second selected text string. I realize this can all be done in the text editor but it's not all that quick. Does anyone know of a macro or mdl which can handle this task? Thanks in advance.---Calvin I don't know of any application that will do what you describe, but have you looked at Edit > Find/Replace text? You may also find Bentley's discussion groups of assistance. Over th...

Text from required text box to read-only text box
Hello, I am fairly new to JavaScript and its use in Acrobat Professional. My situation is this: I have a form with a text box field which is required for the user to enter his/her name. I would like the required text box to display the name in all caps. I also need the user's name to appear in a read-only text box later in the form, which I would like to have the first letter of the user's first, middle initial, and last names to be capitalized. I would also like to have all required fields on the form highlighted in yellow, but the highlighting not printed. Lastly, I would like the...

Insert carriage return in a text field to warp text down
I've imported data from a database - containing separate fields for name, address and postcode, into one single text field in another database (I know that's rotten database practice, but I was asked to do this at work). I concatenated the fields in the "donor database then mapped the single concatenated field to the recipient single text field on import. I now have a field containing name, address and postcode, with spaces between each element(I inserted them), but of course there is no wrapping. I now have (example) MrTest Name Test Address TestPostcode in a single text field...

Encryption from text to text...
I am looking for an encryption algorithm that converts plain texts into another form, one character to another...What are the nice and simple algorithms out there? Thanks. In article <418f03f8@news.starhub.net.sg>, Kelvin <thefatcat28@hotmail.com> wrote: > I am looking for an encryption algorithm that converts plain texts into > another > form, one character to another...What are the nice and simple algorithms out > there? > > Thanks. You can look on CPAN (<http://search.cpan.org>) for various Crypt:: modules. FYI: this newsgroup is defunct. Try co...

Reading Text File, Text Scrolling and erase line from a text file
Hi , How can I Reading Text File, then Text Scrolling by means of keys "page UP" "page Down" and erase a specific line from a text file , when press "F2" key? Best Regards, Lidia from Poland -- ========================================= Pozdrawiam Lidiaa Lidiaa schrieb: > Hi , > > How can I Reading Text File, then Text Scrolling by means of > keys "page UP" "page Down" and erase a specific line from a text > file , when press "F2" key? > > ...

popup text when the pointer is on some text
Hi, on most (all?) browsers, when you put the pointer on a <a href="..." title="popup text">this is a link</a> without clicking on the link, there is a popup caption with the "popup text". I would like to achieve the same with some text that is not a link. I realized that I could simply make it <a title="popup text">this is just some text</a> My question: is it the best way to achieve what I want? Are there alternative ways? Is it portable? Thank you! Once upon a time *Orloff* wrote: > Hi, > on most (al...

Text IN an Image To Straight Text?
Hi. (I'm not sure where to ask this so I'm trying a few newsgroups) I have some .jpg's of text documents. Is there a utility which will work like OCR in a scanner, helping to convert the text WITHIN the image to straight text? I don't have a printer working at the moment, or I'd print the .jpg's and then scan them using OCR. (The format doesn't necessarily have to be .jpg) Thanks in advance for any help GP Yes, if the image is not to bad a pic (not much noise and all that). Try http://www.twocows.com/windows.html I know they have a couple of ocr programs s...

text file not mac text
please remind me of the difference. An 8-bit prog. I have needs ASCII text. if I save a file as TEXT or simpletext on a mac, it isnt accepted. I remember 'forked files' but no details...... Is there a II utilty to 'convert' a mac text file to acceptable II ascii text? thanks. cornelio <cornelio@san.rr.com> wrote: > please remind me of the difference. An 8-bit prog. I have needs ASCII > text. if I save a file as TEXT or simpletext on a mac, it isnt accepted. > I remember 'forked files' but no details...... > > Is there a II utilty to '...

matrix and text to a text file
Hi, I know some similar question have been solved before but I have been reading for a while and I didn't find the answer of my question so, I ask you. I want to create a text-file (.txt) where I will have some text and some matrixs. The format that i want is something like that: -Title- Name1. Name2. power(dbm): big matrix (12000X400) aprox frequency(hz) vector(1x12) aprox So, i created a m-file that can do this writing with fprintf every single character on the file using lots of for loops. It works good but if the matrix is that size it could take a time (about 7 min...

rich text in text field
I am using GUIDE for my UI work. (MATLAB 2009b) I would like to display some rich-text (font size change, bold, underline etc) inside a panel. Can I put some rich-text, using html tags, in a text field? For example: <html><b> this is bold </b></html> I know you can do it in table headers. Thank you. ...

Web resources about - Why does $TEXT() not return text? - comp.lang.mumps

Desert Strike: Return to the Gulf - Wikipedia, the free encyclopedia
The game was later released on several other formats, including a much upgraded version for the Amiga home computer. The game was inspired by ...

Mariners' Luis Garcia right at home as he returns to big stage
New Central Coast Mariners marquee player Luis Garcia has promised there is plenty more in store after making a game-changing 30-minute cameo ...

Forme Philly Commissioner Charles Ramsey returns to advise Chicago police
Chicago Mayor Rahm Emanuel and the Chicago Police Department announced Sunday that former Philadelphia Police Commissioner Charles Ramsey will ...

Open Thread: Return of the Romney-ites
Trump in own words, demonstrating what a liar & opportunist he is. Other than the ego & the racism, no there there. https://t.co/ulakTvYboT ...

Don't call 'The X-Files' return a reboot, says show creator — here's why
After nine seasons, two movies, and 13 years off the air, "The X-Files" returns to Fox with six new episodes on Sunday. And there are certain ...

Former Chicago cop returns to advise department
Chicago Tribune Former Chicago cop returns to advise department Chicago Tribune Mayor Rahm Emanuel announced Sunday that a Chicago native ...

Tina Fey's Sarah Palin gets off Facebook to return to SNL in style
Technically Incorrect: Sometimes, being a social media star isn't enough. You still need the bright lights of TV and an endorsement of Donald ...

Goth Felicity Returns In New Arrow TV Spot
Felicity Smoak is getting a visit from her former self! In a 2014 episode of Arrow, "The Secret Origin of Felicity Smoak," we got to see flashbacks ...

Tina Fey Returns To SNL To Pan Palin's Trump Endorsement
We all knew this was coming after Sarah Palin's long, rambling, spite-filled endorsement speech she gave Donald Trump earlier this week. Tina ...

Watch Tina Fey Return To ‘Saturday Night Live’ To Portray Sarah Palin
Watch Tina Fey Return To ‘Saturday Night Live’ To Portray Sarah Palin

Resources last updated: 1/25/2016 8:58:11 AM