Search DominoPower's 11,443 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
LSI_Info: obscure but useful information in LotusScript (continued)

  • lsi_info(1) has been documented in other places as containing the line number, same as erl(). It doesn't. I don't know what it is.
  • lsi_info(6) contains the current version of LotusScript. I can't see hugely where it might be helpful, but I have in the past had LS code that has interrogated the Notes build version to see whether something can be done or not, so there may be cases where knowing the Script version would help.
  • lsi_info(9) contains the current language setting. For example, "en" is English.

I also found some memory-related values:

  • lsi_info(50) contains the amount of memory allocated to LotusScript.
  • lsi_info(51) contains the amount of memory allocated to LotusScript from the OS. How this differs from lsi_info(50), I'm not sure.
  • lsi_info(52) contains the number of memory blocks allocated.

I guess these might be of value occasionally if you seem to have memory-related problems. But as LotusScript does all the memory management for you, there seems to me to be little value in these for mainstream LS programming.

Here are some clock values:

  • lsi_info(98) is the number of clock-ticks per second, apparently is only supported on platforms that support parallel processing.
  • lsi_info(99) is the number of clock ticks. No, I don't now how useful this would be either.

More strange curiosities:

  • lsi_info(420) is the current line number, same as erl()
  • lsi_info(421) is the name of the current module, and seems to be the same as lsi_info(2)
  • lsi_info(430) is the line number in the calling module that called this module.

This last now enables us to extend our error reporting line:

Call NotesLog.LogError(Err,Lsi_info(2) & " called by " & Lsi_info(12) & "(" & Lsi_info(430) & "): " & Error$ & " - Line: " & Cstr(Erl) & doc.universalID

of course we could use a print or messagebox statement. The following Print statement:

Print Lsi_info(2) & " called by " & Lsi_info(12) & "(" & Lsi_info(430) & "): " & Error$ & " - Line: " & Cstr(Erl)

might generate a line such:

SUBSUBMODULE called by SUBMODULE(8): Division by zero - Line: 4

And that's progress. We now have a line of code that, when used in an error-handling block, will generate a meaningful error message, and which can be copied and pasted with no need to change anything.

More info from GetThreadInfo
When I was researching this article, I also came across the LotusScript function GetThreadInfo. The help for this says that it returns system information about the thread. It explains that there are a small number of constants that you can pass to it, and it will return appropriate values.

These constants are defined in the lsprcval.lss file (not lsprval.lss, without the "c", as the help says) that you will find in your Notes client program directory. All of these return values that can be found in the lsi_info value set, as shown in Table A.


« Previous  ·  1  ·  2  ·  3  ·  Next »
Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Syncing Notes with Android phones
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Online safety for virtual learning
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Seek and find: Strategies to locate filed-away emails fast
-- Advertisement --

Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done. Native to Lotus Domino. The User Experience unseen for Lotus Domino. Do more with less. Really.

See the possibilities Docova unleashes for Lotus Domino.
-- Advertisement --

Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes.

Try IntelliPRINT NOW!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login