Welcome Guest! To enable all features please Login or Register.



Go to last post Go to first unread
Offline Engr  
#1 Posted : 21 July 2021 17:52:42(UTC)

Rank: Member

Groups: Registered
Joined: 10/08/2011(UTC)
Posts: 22
Location: Missouri

Was thanked: 6 time(s) in 4 post(s)
I have a previous VB subroutine (with a iterative mathematical calculation) which I would like to put into a plug-in for use with SMath Studio. I have started with the VB.net plug-in template and have a function started which passes the starting values from a smath worksheet to the plug-in. I have gotten so far as the values from the worksheet are transfered to the plug-in as TNumber objects. I need to convert the values from TNumber to Single or Double VB numbers to pass them to the subroutine (the subroutine uses single and doubles in the calculations). Is there a way to convert between TNumber and Single or double and then back again in VB code?

Offline uni  
#2 Posted : 21 July 2021 20:41:03(UTC)

Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,155
Russian Federation

Was thanked: 1004 time(s) in 581 post(s)
I recommend making a copy of the repository on a local disk and then looking for code examples in it.

Also, right in the program there is a user's guide (or Core documentation).


[TNumber].obj.ToDouble() - convert to double

New TNumber( double, double ) or CType( double, TNumber ) - for back operation, but I'm not sure how it will look in basic. There is an implicit conversion operator.



Edited by user 21 July 2021 20:45:44(UTC)  | Reason: Not specified

Russia ☭ forever
Viacheslav N. Mezentsev
💰 Support me for plugins development: https://yoomoney.ru/to/410013245578758
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.