Author Topic: Misc Undocumented stuff  (Read 2959 times)

bdeck

  • Hero Member
  • *****
  • Posts: 896
Misc Undocumented stuff
« on: September 07, 2008, 12:40:36 PM »
1) The MKS$()/CVS() documentation should be replaced by a note explaining that conversion is now performed inexplicitly by simple assignment operators, and that print formatting can be used to assign a numeric result to a string variable.

mks$() and cvs() are apparently nonworking functions.

2) sys(36) value of 2 should be documented. It appears to suppress redraw, anything else?

3) sys(130) and sys(131) appear to have a minimum value of 1, not 10000.

regards,

BD
« Last Edit: September 08, 2008, 04:16:29 PM by bdeck »

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4230
Re: Misc Undocumented stuff
« Reply #1 on: September 09, 2008, 08:37:00 AM »
1) MKS and CVS are working as intended. You may be misunderstanding the purpose -- MKS$ converts a number to an 8-character BINARY string -- i.e. the string contains the actual underlying 8 bytes for a double, not a human-friendly string that looks like, for example, "3.125". CVS reads that binary data back to a regular number. These are mostly useful if you want to store a bunch of numeric data in binary records. See attached mkstest.d3m for sample usage. Working with binary records CAN be a bit fiddly, I admit, but the functions are working like they should.

2) I haven't had a chance to dig into the extra values yet. You're right, it needs documentation.

3) You enter the "magic" value of -10000 into these sys() functions in order to center the dialog box. See attached centerwin.d3m for example.
25 years with DesignCAD

bdeck

  • Hero Member
  • *****
  • Posts: 896
Re: Misc Undocumented stuff
« Reply #2 on: September 09, 2008, 09:31:30 AM »
Thanks DT,

I had mistaken mks and cvs for DC versions of the more commonly used str$() and val(), which are handled inexplicitly by the assignment operator.

I meant to suggest an expanded documentation of the assignment operator, perhaps with a note where one would expect to find find str$() and val().
 
ie:

a$= "b+c"
b=2
c=5
g$="*5"

d=a$                       'cool
e=a$+g$                  'cool
fs=sqrt(a$+g$)          'not cool
t="sqrt("+a$+g$+")"    'cool
f$=d+e                     'cool

print d,e,s,t,f$
anykey

result: 7.000  27.000 27.000 5.196 34.000                         
« Last Edit: September 09, 2008, 11:01:27 AM by bdeck »

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4230
Re: Misc Undocumented stuff
« Reply #3 on: September 09, 2008, 10:33:25 AM »
Ahhh, thanks Brent. Now I understand your intent better :)
25 years with DesignCAD