News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Misc Undocumented stuff

Started by bdeck, September 07, 2008, 12:40:36 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

bdeck

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

DrollTroll

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

#2
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                         

DrollTroll

Ahhh, thanks Brent. Now I understand your intent better :)
25 years with DesignCAD