go to post Oleg Dmitrovich · Aug 23, 2019 instead of using a magic number 10000, it would be better to use a macro $$$MaxLocalLength, see %Stream.FileBinary:ReadLine
go to post Oleg Dmitrovich · Jul 20, 2018 but remember about performance ... /// Process private global with indirectionClassMethod Test(val = 3) [ ProcedureBlock = 0 ]{ s:'$d(^||addr) ^||addr(1)=1, (^(2),^(8),^(9))=289, ^(3)=3 d @("t1case" _ $g( ^||addr( val ) ) ) Q t1case1 w !, "Case 1" Qt1case3 w !, "Case 3" Qt1case289 w !, "Case 2 or 8 or 9" Qt1case w !,"Case default" Q}/// Local variable with indirectionClassMethod Test2(val = 3) [ ProcedureBlock = 0 ]{ s:'$d(addr) addr(1)=1, (addr(2),addr(8),addr(9))=289, addr(3)=3 d @( "t2case"_$g( addr( val ) ) ) Q t2case1 w !, "Case 1" Qt2case3 w !, "Case 3" Qt2case289 w !, "Case 2 or 8 or 9" Qt2case w !,"Case default" Q}/// Without indirectionClassMethod Test3(val = 3) [ ProcedureBlock = 0 ]{ if val=1 w !, "Case 1" Q if val=3 w !, "Case 3" Q if (val=2)!(val=8)!(val=9) w !, "Case 2 or 8 or 9" Q w !,"Case default"}/// Process private global without indirectionClassMethod Test4(val = 3) [ ProcedureBlock = 0 ]{ s:'$d(^||addr) ^||addr(1)=1, (^(2),^(8),^(9))=289, ^(3)=3 d $case($g(^||addr(val)),1:t4case1,289:t4case289,3:t4case3,:t4case) Q t4case1 w !, "Case 1" Qt4case3 w !, "Case 3" Qt4case289 w !, "Case 2 or 8 or 9" Qt4case w !,"Case default" Q}/// Local variable without indirectionClassMethod Test5(val = 3) [ ProcedureBlock = 0 ]{ s:'$d(addr) addr(1)=1, (addr(2),addr(8),addr(9))=289, addr(3)=3 d $case($g(addr(val)),1:t5case1,289:t5case289,3:t5case3,:t5case) Q t5case1 w !, "Case 1" Qt5case3 w !, "Case 3" Qt5case289 w !, "Case 2 or 8 or 9" Qt5case w !,"Case default" Q}ClassMethod Run() {s repeat = 1000s ts = $zh for i=1:1:repeat { d ..Test( $r(10)+1 ) } s t1 = ( $zh - ts )s ts = $zh for i=1:1:repeat { d ..Test2( $r(10)+1 ) } s t2 = ( $zh - ts )s ts = $zh for i=1:1:repeat { d ..Test3( $r(10)+1 ) } s t3 = ( $zh - ts )s ts = $zh for i=1:1:repeat { d ..Test4( $r(10)+1 ) } s t4 = ( $zh - ts )s ts = $zh for i=1:1:repeat { d ..Test5( $r(10)+1 ) } s t5 = ( $zh - ts )w !, "do @( ^||addr() ) : ", t1w !, "do @( addr() ) : ", t2w !, "if val=case Q : ", t3w !, "do $case( ^||addr() ) : ", t4w !, "do $case( addr() ) : ", t5}Output: do @( ^||addr() ) : .019535do @( addr() ) : .016482if val=case Q : .015183do $case( ^||addr() ) : .015971do $case( addr() ) : .015078
go to post Oleg Dmitrovich · Jul 19, 2018 Hi, Vitaliy!1,2,3 - fix it and update, thank you; 4 - agree with you
go to post Oleg Dmitrovich · Jul 13, 2018 Thank you, Evgeny!Congrats also should go to @Nikita.Savchenko, @Dmitry Maslennikov, @Tobias GraupnerBut it's not installations, it's counter of downloads. After each version release, VS Code automatically download it.According to my observations, there are approximately 100 active users of the plugin.
go to post Oleg Dmitrovich · Jul 11, 2018 ... at least Atelier API ...Especially, documentation for Atelier Debugger API?
go to post Oleg Dmitrovich · Jul 11, 2018 Hi, Andreas!Sounds like sad news :( Does ISC plan to publish any library for working with AST ( Abstract Syntax Tree ) for Caché ObjectScript?
go to post Oleg Dmitrovich · Jan 23, 2018 Class Rick.ChangeItem Extends %SerialObject ...butProperty Changes As List Of DC.serItem;It's also interesting how used ( insert, update, select ) DC.listItem in your app? via object or/and SQL ( dirty ;) access?
go to post Oleg Dmitrovich · Jan 11, 2018 Be careful with session - see %CSP.Session:Unlock documentation or should it all be kept in a class in any unclear situation - use a class :)
go to post Oleg Dmitrovich · Jan 5, 2018 The first tip about the debugger is simple and brief: Use a debugger, always
go to post Oleg Dmitrovich · Jan 4, 2018 There is some inaccuracy here. "you need to add" must be "you need to override". And you're right, any edits will be overwritten with a product upgrade. In addition, remember that there is a purge audit log background task - see Task Manager in SMP.
go to post Oleg Dmitrovich · Aug 1, 2017 For many simple statements and common operations, they will perform nearly the same This is my case, thanks for clarifying, Daniel!
go to post Oleg Dmitrovich · Aug 1, 2017 I'm not sure, but, as I recall (2013-2014), both classes generate the same code as a result and work with roughly the same performance ( except for access to properties data )I did not save the test code, sorry
go to post Oleg Dmitrovich · Aug 1, 2017 The newer dynamic SQL classes (%SQL.Statement and %StatementResult) perform better than %ResultSet I'm not sure, but it seems that this is obsolete information, just check generated code ( Ctrl+V in Studio )