See

If you run the following code, then the type of variables a and b in the generated class will be %Stream.GlobalCharacter

create table dc.test
(
LONGVARCHAR,
b CLOB
)
In addition, I'm no expert in JDBC but wit seems that LONGVARCHAR has a Maximum Length 32,700 characters in JDBC, not quite enough for an arbitrary stream.
Max Size for LONGVAR(BINARY/CHAR) = 2147483647, for VAR(BINARY/CHAR) = 4096

PS: By the way, in DbVisualizer you can view all types supported by the InterSystems IRIS JDBC driver, their numeric codes, maximum sizes, and much more.

Same thing, just different:

set true="1",
    false=0,
    j={}do j.%Set("a",1,"boolean")
do j.%Set("b",0,"boolean")
set j.c=true
set j.d=false
  
set iter j.%GetIterator()
while iter.%GetNext(.key, .value, .type {
  write "key = "_key_", value = "_value_", type = "_type,!
}

Output:
key = a, value = 1, type = boolean
key = b, value = 0, type = boolean
key = c, value = 1, type = string
key = d, value = 0, type = number
Actually, my another proposal is to have true and false as part of the language, where true=1 and false 0 or similar for booleans.
Isn't that the case now?
set true="1",
    false=0,
    j={"a":true,"b":false,"c":(true),"d":(false)}

</FONT><FONT COLOR="#0000ff">set </FONT><FONT COLOR="#808000">iter </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#808000">j</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">%GetIterator</FONT><FONT COLOR="#000000">() </FONT><FONT COLOR="#0000ff">while </FONT><FONT COLOR="#808000">iter</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#0000ff">%GetNext</FONT><FONT COLOR="#000000">(.</FONT><FONT COLOR="#808000">key</FONT><FONT COLOR="#000000">, .</FONT><FONT COLOR="#808000">value</FONT><FONT COLOR="#000000">, .</FONT><FONT COLOR="#808000">type </FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#800080">{   </FONT><FONT COLOR="#0000ff">write </FONT><FONT COLOR="#008000">"key = "</FONT><FONT COLOR="#000000"></FONT><FONT COLOR="#808000">key</FONT><FONT COLOR="#000000"></FONT><FONT COLOR="#008000">", value = "</FONT><FONT COLOR="#000000"></FONT><FONT COLOR="#808000">value</FONT><FONT COLOR="#000000"></FONT><FONT COLOR="#008000">", type = "</FONT><FONT COLOR="#000000">_</FONT><FONT COLOR="#808000">type</FONT><FONT COLOR="#000000">,! </FONT><FONT COLOR="#800080">}</FONT>

Output: key = a, value = 1, type = boolean key = b, value = 0, type = boolean key = c, value = 1, type = string key = d, value = 0, type = number

@Evgeny Shvarov

Unfortunately, I have not yet found a documented and [Not Internal] way out of the box to see not only the text of the request, but also the values of its input parameters.

PS: take a look at the methods of the %SYSTEM.SQL.xDBC class. Here is an example of the log for the query above (from DbVisualizer):

SQL text (raw from client): 1 lines
line 1: SELECT * FROM del . a WHERE id < :%qpar(1)
Var Types: Parameter 1: Constant of type INTEGER
INPUT params:
%qpar(1) = 3

If auditing is enabled, you can see the query without the actual parameter values. To copy the query to the SQL query tool, the query will also have to be cleaned of garbage.

For example, there is the following query

<FONT COLOR="#0000ff">select </FONT><FONT COLOR="#000080">* from </FONT><FONT COLOR="#008000">del.a </FONT><FONT COLOR="#000080">where </FONT><FONT COLOR="#008000">id</FONT><FONT COLOR="#000000"><3</FONT>

From SMP:

Event: DynamicStatementQuery
Event Data: <FONT COLOR="#0000ff">SELECT </FONT><FONT COLOR="#000080"> FROM </FONT><FONT COLOR="#008000">del . a </FONT><FONT COLOR="#000080">WHERE </FONT><FONT COLOR="#008000">id </FONT><FONT COLOR="#000000">< </FONT><FONT COLOR="#000080">?</FONT>
From DbVisualizer:
Event: XDBCStatementQuery
Event Data: <FONT COLOR="#0000ff">SELECT </FONT><FONT COLOR="#000080"> INTO </FONT><FONT COLOR="#800000">:i%%col1</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#800000">:i%%col2</FONT><FONT COLOR="#000000">, </FONT><FONT COLOR="#800000">:i%%col3 </FONT><FONT COLOR="#000080">FROM </FONT><FONT COLOR="#008000">del . a </FONT><FONT COLOR="#000080">WHERE </FONT><FONT COLOR="#008000">id </FONT><FONT COLOR="#000000">< </FONT><FONT COLOR="#800000">:%qpar</FONT><FONT COLOR="#000000">(1)</FONT>

Since you used the migration wizard, I assume that the problem is due to the primary key ID and the indexes on it.

Can you use the wizard to create a test table with only two fields, ID and row_status, and post the source code of the generated class here? And more: how many records are there in the table?

Enable auditing for %System/%SQL/DynamicStatementQuery, %System/%SQL/EmbeddedStatementQuery, %System/%SQL/XDBCStatementQuery system events.

You can view last actual values of the passed parameters of SQL query in SMP: System > Processes > Process Details > Variables

I'm curious why LPAD, RPAD and similar string functions are not exposed as $SYSTEM.SQL.Functions class members
This is a good question that I would also like to get an answer to.

LPAD is a SQL function, not an ObjectScript function, which is why it didn't work for you if you replaced the single quotes with double quotes.

USER>write ">"_LPAD(1,10,"0")_"<"
><
USER>write ">"_$$lpad^%qarfunc(1,10,"0")_"<"
>0000000001<

There are two ways to solve the problem: using embedded SQL or an analog of LPAD for ObjectScript, for example:

CREATE TABLE example_table (
    id VARCHAR(10PRIMARY KEY,
    normalized_id VARCHAR(10COMPUTECODE {
        &sql(select LPAD(:{id}, 10, '0'into :{*})
    }
    COMPUTEONCHANGE(id))

This should be checked on your environment, depending on the versions of Caché, Windows, and Microsoft SQL Server used. I have already provided the code for this above.

I would advise you to first make sure that you are using the latest version of Caché (and the ODBC/JDBC driver), which has fixed many bugs, including various memory leaks: Caché® and Ensemble® Change Notes (2018.1.11)

In addition, you may find the New Method $SYSTEM.Util.CleanDeadJobs() useful.

Once upon a time, when the grass was greener and the sky was bluer, there was even an add-in application Caché RoseLinkPDF.

Here is what is in the documentation for Caché:

Disable Query Timeout — Optional. If selected, causes the ODBC client driver to ignore the value of the ODBC query timeout setting.

The ODBC query timeout setting specifies how long a client should wait for a specific operation to finish. If an operation does not finish within the specified time, it is automatically cancelled. The ODBC API provides functions to set this timeout value programmatically. Some ODBC applications, however, hard-code this value. If you are using an ODBC application that does not allow you to set the timeout value and the timeout value is too small, you can use the Disable Query Timeout option to disable timeouts.

java.sql Exceptions The following exceptions are listed here for completeness, but are not required and are never used: ... SQLTimeoutException ...

You can empirically verify all your considerations by calling a custom stored procedure from Microsoft SQL Server, for example:
Class dc.a Abstract ]
{

</FONT><FONT COLOR="#000080">Query </FONT><FONT COLOR="#000000">DbgSqlProc(   </FONT><FONT COLOR="#ff00ff">qMaxRows </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">10</FONT><FONT COLOR="#000000">,   </FONT><FONT COLOR="#ff00ff">qTimeWait </FONT><FONT COLOR="#000080">As %SmallInt </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">3</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#000080">As %Query</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#000080">ROWSPEC </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#800080">"nrow:%Integer,name:%String"</FONT><FONT COLOR="#000000">) [ </FONT><FONT COLOR="#000080">SqlProc </FONT><FONT COLOR="#000000">] { }

</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">DbgSqlProcExecute(   </FONT><FONT COLOR="#000080">ByRef </FONT><FONT COLOR="#ff00ff">qHandle </FONT><FONT COLOR="#000080">As %Binary</FONT><FONT COLOR="#000000">,   </FONT><FONT COLOR="#ff00ff">qMaxRows </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">10</FONT><FONT COLOR="#000000">,   </FONT><FONT COLOR="#ff00ff">qTimeWait </FONT><FONT COLOR="#000080">As %SmallInt </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">3</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#000080">As %Status </FONT><FONT COLOR="#000000">{   </FONT><FONT COLOR="#0000ff">#define </FONT><FONT COLOR="#000000">Log(%s) </FONT><FONT COLOR="#0000ff">Set ^dbgSqlProc(qHandle(</FONT><FONT COLOR="#008000">"id"</FONT><FONT COLOR="#0000ff">),%s)=$ZDateTime($NOW(),1,1,6)      Set </FONT><FONT COLOR="#800000">qHandle</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"id"</FONT><FONT COLOR="#000000">)=</FONT><FONT COLOR="#0000ff">$Increment</FONT><FONT COLOR="#000000">(^dbgSqlProc)   </FONT><FONT COLOR="#0000ff">Set </FONT><FONT COLOR="#800000">qHandle</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"qMaxRows"</FONT><FONT COLOR="#000000">)=</FONT><FONT COLOR="#800000">qMaxRows   </FONT><FONT COLOR="#0000ff">Set </FONT><FONT COLOR="#800000">qHandle</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"qTimeWait"</FONT><FONT COLOR="#000000">)=</FONT><FONT COLOR="#800000">qTimeWait

  </FONT><FONT COLOR="#0000ff">$$$Log</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"1_Execute"</FONT><FONT COLOR="#000000">)

  </FONT><FONT COLOR="#0000ff">For </FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">=1:1:</FONT><FONT COLOR="#800000">qMaxRows </FONT><FONT COLOR="#0000ff">Set </FONT><FONT COLOR="#800000">qHandle</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">)=</FONT><FONT COLOR="#0000ff">$ListBuild</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#008000">"name"</FONT><FONT COLOR="#000000">_</FONT><FONT COLOR="#800000">i</FONT><FONT COLOR="#000000">)   </FONT><FONT COLOR="#0000ff">Set </FONT><FONT COLOR="#800000">qHandle</FONT><FONT COLOR="#000000">=0      </FONT><FONT COLOR="#008000">; Hang qHandle("qTimeWait")*3      </FONT><FONT COLOR="#0000ff">Quit $$$OK </FONT><FONT COLOR="#000000">}

</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">DbgSqlProcFetch(   </FONT><FONT COLOR="#000080">ByRef </FONT><FONT COLOR="#ff00ff">qHandle </FONT><FONT COLOR="#000080">As %Binary</FONT><FONT COLOR="#000000">,   </FONT><FONT COLOR="#000080">ByRef </FONT><FONT COLOR="#ff00ff">Row </FONT><FONT COLOR="#000080">As %List</FONT><FONT COLOR="#000000">,   </FONT><FONT COLOR="#000080">ByRef </FONT><FONT COLOR="#ff00ff">AtEnd </FONT><FONT COLOR="#000080">As %Integer </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">0</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#000080">As %Status </FONT><FONT COLOR="#000000">[ </FONT><FONT COLOR="#000080">PlaceAfter </FONT><FONT COLOR="#000000">= DbgSqlProcExecute ] {   </FONT><FONT COLOR="#0000ff">$$$Log</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"2_Fetch"</FONT><FONT COLOR="#000000">)      </FONT><FONT COLOR="#0000ff">If </FONT><FONT COLOR="#800000">qHandle</FONT><FONT COLOR="#000000">></FONT><FONT COLOR="#800000">qHandle</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"qMaxRows"</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#800080">{     </FONT><FONT COLOR="#0000ff">Set </FONT><FONT COLOR="#800000">Row</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">""     </FONT><FONT COLOR="#0000ff">Set </FONT><FONT COLOR="#800000">AtEnd</FONT><FONT COLOR="#000000">=1   </FONT><FONT COLOR="#800080">}</FONT><FONT COLOR="#0000ff">else</FONT><FONT COLOR="#800080">{     </FONT><FONT COLOR="#0000ff">Set </FONT><FONT COLOR="#800000">Row</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#800000">qHandle</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#0000ff">$Increment</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">qHandle</FONT><FONT COLOR="#000000">))     </FONT><FONT COLOR="#0000ff">Hang </FONT><FONT COLOR="#800000">qHandle</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"qTimeWait"</FONT><FONT COLOR="#000000">)   </FONT><FONT COLOR="#800080">}   </FONT><FONT COLOR="#0000ff">Quit $$$OK </FONT><FONT COLOR="#000000">}

</FONT><FONT COLOR="#000080">ClassMethod </FONT><FONT COLOR="#000000">DbgSqlProcClose(</FONT><FONT COLOR="#000080">ByRef </FONT><FONT COLOR="#ff00ff">qHandle </FONT><FONT COLOR="#000080">As %Binary</FONT><FONT COLOR="#000000">) </FONT><FONT COLOR="#000080">As %Status </FONT><FONT COLOR="#000000">[ </FONT><FONT COLOR="#000080">PlaceAfter </FONT><FONT COLOR="#000000">= DbgSqlProcExecute ] {   </FONT><FONT COLOR="#0000ff">$$$Log</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008000">"3_Close"</FONT><FONT COLOR="#000000">)      </FONT><FONT COLOR="#0000ff">Quit $$$OK </FONT><FONT COLOR="#000000">}

}</FONT>

Example of a call: <FONT COLOR="#0000ff">select </FONT><FONT COLOR="#000080">* from </FONT><FONT COLOR="#008000">dc</FONT><FONT COLOR="#000000">.</FONT><FONT COLOR="#008000">a_DbgSqlProc</FONT><FONT COLOR="#000000">(11,5)</FONT>

See Customized Class Queries

 

dc.onetomany.PKG

Class dc.onetomany.products Extends %Persistent
{
Parameter ALLOWIDENTITYINSERT = 1;
Property name As %VarString SqlColumnNumber ];
Property listpriceusd As %BigInt SqlColumnNumber ];
Property description As %VarString SqlColumnNumber ];
}Class dc.onetomany.sales Extends %Persistent
{
Parameter ALLOWIDENTITYINSERT = 1;
Property companyid As %BigInt SqlColumnNumber ];
Property productid As %BigInt SqlColumnNumber ];
Property saledate As %Date SqlColumnNumber ];
Property saleamountusd As %BigInt SqlColumnNumber ];
}Class dc.onetomany.companies Extends %Persistent
{
Parameter ALLOWIDENTITYINSERT = 1;
Property name As %VarString SqlColumnNumber ];
Property industry As %VarString SqlColumnNumber ];
Property description As %VarString SqlColumnNumber ];
Property website As %VarString SqlColumnNumber ];

Query CompaniesBySales() As %SQLQuery(CONTAINID 1ROWSPEC "id:%Integer,name:%String,industry:%String,description:%String,website:%String,totalsales:%Numeric") [ SqlName CompaniesBySalesSqlProc ]
{
SELECT c.id,
       c.name,
       c.industry,
       c.description,
       c.website,
       SUM(s.saleamountusdAS totalsales
FROM dc_onetomany.sales s
JOIN dc_onetomany.companies c ON c.id s.companyid
GROUP BY c.idc.namec.industryc.descriptionc.website
ORDER BY totalsales DESC
}

Query CompanySalesTotal(companyid As %IntegerAs %SQLQuery(CONTAINID 1ROWSPEC "companyid:%Integer,totalsales:%Numeric") [ SqlName CompanySalesTotalSqlProc ]
{
SELECT :companyid AS companyid,
       COALESCE(SUM(s.saleamountusd), 0) AS totalsales
FROM dc_onetomany.sales s
WHERE s.companyid :companyid
}

/// d ##class(dc.onetomany.companies).Test()
ClassMethod Test()
{
  ##class(dc.onetomany.sales).%KillExtent()
  ##class(dc.onetomany.companies).%KillExtent()
  ##class(dc.onetomany.products).%KillExtent()
  
  &sql(LOAD DATA FROM FILE 'C:\data\companies.csv'
  INTO dc_onetomany.companies(id,name,industry,description,website)
  USING {"from":{"file":{"header":true}}})
  
  &sql(LOAD DATA FROM FILE 'C:\data\products.csv'
  INTO dc_onetomany.products(id,name,listPriceUSD,description)
  USING {"from":{"file":{"header":true}}})
  
  &sql(LOAD DATA FROM FILE 'C:\data\sales.csv'
  INTO dc_onetomany.sales(ID,companyId,productId,saleDate,saleAmountUSD)
  VALUES (saleId,companyId,productId,saleDate,saleAmountUSD)
  USING {"from":{"file":{"header":true}}})
  
  rs ##class(%ResultSet).%New("dc.onetomany.companies:CompanySalesTotal")
  rs.Execute(103)
  rs.Next()
  rs.Get("totalsales")," <- 17000",!
  rs ##class(%ResultSet).%New("dc.onetomany.companies:CompanySalesTotal")
  rs.Execute(104)
  rs.Next()
  rs.Get("totalsales")," <- 7000",!
  
  c=##class(dc.onetomany.companies).%New()
  c.name="my name 111"
  c.%Save()
  "current ID = ",c.%Id(),!
  
  &sql(insert into dc_onetomany.companies(ID,namevalues(500,'my name 500'))
  "current ID = ",%ROWID,!
  &sql(insert into dc_onetomany.companies(namevalues('my name 501'))
  "current ID = ",%ROWID,!
}

}
USER>##class(dc.onetomany.companies).Test()
17000 <- 17000
7000 <- 7000
current ID = 111
current ID = 500
current ID = 501
Interestingly, if I try your examples, I can recreate the ambiguity error, but then get an error when attempting to specify the full param specification
What is your version of IRIS and .NET? I have IRIS 2025.3CE and .NET 8.0/Framework 4.6.2 - the examples above work flawlessly and give respectively 1, 0, 1 as indicated in the comments.

This is also possible:

USER>gw $System.external.getDotNetGateway()
USER>gw.invoke("System.Convert","ToBoolean(System.UInt64)",123)
1
USER>

Since you manage the ID yourself, in the general case it may not necessarily be a simple counter, but, for example, a Fibonacci sequence. If the source code of the class or table is available, it is better to see how the ID is generated in it. If there is no source code, and you are sure that this is a simple counter, then in my opinion it would be easier to make a standard ID and let IRIS manage it itself.

var irisReference = new IRISReference("");
    iris.ClassMethodStatusCode("TestClasses.TestClass", "Method1", irisReference);
    var pReturn = (IRISObject)irisReference.value;
    var list = (IRISObject)pReturn.Get("Entries");
    for (var i = 1; i <= list.InvokeLong("Count"); i++)
    {
        var entry = (IRISObject)list.InvokeObject("GetAt", i);
        Console.WriteLine(entry.GetString("Username"));

    }

gateway.new() calls a constructor, but the System.Convert class has no constructors.

To call a static method, use gateway.invoke(), but keep in mind that if you call the following code, an error will occur <FONT COLOR=red>"Unable to resolve method overloading ambiguity":

write netGate.invoke("System.Convert","ToBoolean",123)

To avoid it, specify the name of the method with the full specification of the parameters, for example:

gw $System.external.getDotNetGateway()
gw.invoke("System.Convert","ToBoolean(int)",123),! ; -> 1
gw.invoke("System.Convert","ToBoolean(string)","false"),! ; -> 0
gw.invoke("System.Convert","ToBoolean(string)","true"),! ; -> 1

PS: see Mapping Specification (pay special attention to the sections "Overloaded Methods" and "Restrictions")

By the way, what do you think this statement does? Note the %OpenId(20) at the end instead of %New(). 

#dim a,b,As Sample.Person ##class(Sample.Person).%OpenId(20)

Confusing. How about this statement?

#dim a,b,As Sample.Company ##class(Sample.Person).%New()

Do you get 3 companies or 3 persons? Does it try to "cast" persons as companies? Do you get an error at compile time or run time? Would it work if Sample.Company extends Sample.Person? More confusion...

There is no confusion.

Here's another example where the class may not even exist and yet the code compiles without errors and according to the documentation.

test.MAC

<FONT COLOR="#0000ff">#dim </FONT><FONT COLOR="#800000">a</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">b</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">c </FONT><FONT COLOR="#0000ff">As </FONT><FONT COLOR="#008080">%Boolean </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">bla.bla</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%OpenId</FONT><FONT COLOR="#000000">(20)
</FONT><FONT COLOR="#0000ff">#dim </FONT><FONT COLOR="#800000">a</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">b</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">c </FONT><FONT COLOR="#0000ff">As </FONT><FONT COLOR="#008080">bla.bla.bla123 </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">bla.bla</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%OpenId</FONT><FONT COLOR="#000000">(20)</FONT>

--> test.INT

<FONT COLOR="#0000ff">Set </FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#800000">a</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">b</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">c</FONT><FONT COLOR="#000000">)=</FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">bla.bla</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%OpenId</FONT><FONT COLOR="#000000">(20)
</FONT><FONT COLOR="#0000ff">Set </FONT><FONT COLOR="#800000">a</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">bla.bla</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%OpenId</FONT><FONT COLOR="#000000">(20),</FONT><FONT COLOR="#800000">b</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">bla.bla</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%OpenId</FONT><FONT COLOR="#000000">(20),</FONT><FONT COLOR="#800000">c</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">bla.bla</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%OpenId</FONT><FONT COLOR="#000000">(20)</FONT>

The only thing is that in this case Studio Assist will not work.

A good thing to know is, that there isn't actually a thing as 'during compile time' in ObjectScript.
Do you think that the documentation contains an error?
##function Evaluates an ObjectScript function at compile time.

#execute Executes a line of ObjectScript at compile time.

##expression Evaluates an ObjectScript expression at compile time.

Vitaliy Serdtsev · Dec 29, 2025 go to post

There are nuances ;)

According to the documentation, the following two lines will give different results at the runtime:

<FONT COLOR="#0000ff">#dim </FONT><FONT COLOR="#800000">a</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">b</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">c </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">Sample.Person</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%New</FONT><FONT COLOR="#000000">() </FONT><FONT COLOR="#008000">; all the variables are assigned the same initial value
</FONT><FONT COLOR="#0000ff">#dim </FONT><FONT COLOR="#800000">a</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">b</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">c </FONT><FONT COLOR="#0000ff">As </FONT><FONT COLOR="#008080">Sample.Person </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#000080">##class</FONT><FONT COLOR="#000000">(</FONT><FONT COLOR="#008080">Sample.Person</FONT><FONT COLOR="#000000">).</FONT><FONT COLOR="#0000ff">%New</FONT><FONT COLOR="#000000">() </FONT><FONT COLOR="#008000">; each variable is assigned a separate OREF</FONT>
Vitaliy Serdtsev · Dec 18, 2025 go to post
  • For each alphabetic character, determine its zero-based index in the lowercase alphabet (a-z).
  • Preserve non-alphabetic characters unchanged.
For clarify: does alphabetical characters include only the English letters a-z, A-Z, or all Unicode characters including "ªµºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéyêëìíîïðñtóôõöøùúûüýþÿ" ?

What should be the correct result for the string <FONT COLOR="#008000">"Hello World µÝ Привет Мир!"</FONT> ?

Vitaliy Serdtsev · Dec 17, 2025 go to post
Your task is to implement this encryption efficiently
What does "efficiently" mean?

The condition of the Code Golf competition has always been to write the shortest code, not the fastest (see Code Golf Index)