Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Nov 21, 2017 10:50 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: RB Benchmark
PostPosted: Tue Feb 19, 2013 7:02 am 
Offline
User avatar

Joined: Fri Feb 15, 2013 6:07 am
Posts: 24
Location: Oran, Algeria
MonkeybreadSoftware wrote:
Maybe you try FormatMBS in our plugins?

for example:

dim d as Double = 123.4567890
listbox1.AddRow FormatMBS("%f", d)
listbox1.AddRow FormatMBS("%e", d)
listbox1.AddRow FormatMBS("%g", d)

listbox1.AddRow FormatMBS("%5.5f", d)
listbox1.AddRow FormatMBS("%5.5e", d)
listbox1.AddRow FormatMBS("%5.5g", d)

d = 0.000000123456
listbox1.AddRow FormatMBS("%f", d)
listbox1.AddRow FormatMBS("%e", d)
listbox1.AddRow FormatMBS("%g", d)

listbox1.AddRow FormatMBS("%5.5f", d)
listbox1.AddRow FormatMBS("%5.5e", d)
listbox1.AddRow FormatMBS("%5.5g", d)

gives this output:

123.456789
1.234568e+02
123.457
123.45679
1.23457e+02
123.46
0.000000
1.234560e-07
1.23456e-07
0.00000
1.23456e-07
1.2346e-07

so you can have various styles.

Greetings
Christian


How to get Plugins ?


Top
 Profile  
Reply with quote  
 Post subject: Re: RB Benchmark
PostPosted: Tue Feb 19, 2013 7:05 am 
Offline
User avatar

Joined: Fri Feb 15, 2013 6:07 am
Posts: 24
Location: Oran, Algeria
MonkeybreadSoftware wrote:
Maybe you try FormatMBS in our plugins?


How to get plugins ?


Top
 Profile  
Reply with quote  
 Post subject: Re: RB Benchmark
PostPosted: Tue Feb 19, 2013 7:17 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
Download them on our page:

http://www.monkeybreadsoftware.de/realb ... gins.shtml

FormatMBS is in the util plugin.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: Re: RB Benchmark
PostPosted: Tue Feb 19, 2013 7:20 am 
Offline

Joined: Wed May 20, 2009 11:02 am
Posts: 423
There is no need to use plugins just for this:
dim x as Double
x= 2.68798271729777e43
msgbox "str="+str(x)+" format="+format(x,"0.0000000000000000000000000e00")


To understand format and other functions/features, you have the RS documentation online: http://docs.realsoftware.com/index.php/Main_Page

You also have a folder in your machine with many examples that come with the IDE, and there is the RB curriculum, which can help you getting used to RB

Pixe

_________________
Using RS2011r4.3 on Windows7.


Top
 Profile  
Reply with quote  
 Post subject: Re: RB Benchmark
PostPosted: Tue Feb 19, 2013 9:07 am 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
You are freaking kidding?
You SELL a pllugin to do something RS already does?

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: RB Benchmark
PostPosted: Tue Feb 19, 2013 9:14 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
FormatMBS can do more things than Format().

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: Re: RB Benchmark
PostPosted: Tue Feb 19, 2013 9:27 am 
Offline
User avatar

Joined: Mon Feb 05, 2007 5:21 pm
Posts: 600
Location: New York, NY
DaveS wrote:
You are freaking kidding?
You SELL a pllugin to do something RS already does?

Even if his version of Format only did what the native Format did (as he points out, it does more), he includes it in a package that does, conservatively, a hundred things that native RS does not do. And that's just the one plugin.

Christian has done a huge service for the RS community.

_________________
Kem Tekinay
MacTechnologies Consulting
http://www.mactechnologies.com/

Need to develop, test, and refine regular expressions? Try RegExRX.


Top
 Profile  
Reply with quote  
 Post subject: Re: RB Benchmark
PostPosted: Wed Feb 20, 2013 4:36 am 
Offline
User avatar

Joined: Fri Feb 15, 2013 6:07 am
Posts: 24
Location: Oran, Algeria
MonkeybreadSoftware wrote:
FormatMBS can do more things than Format().

Greetings
Christian

Hello,
What is the price of this plugins ?
Regards.


Top
 Profile  
Reply with quote  
 Post subject: Re: RB Benchmark
PostPosted: Wed Feb 20, 2013 4:41 am 
Offline
User avatar

Joined: Fri Feb 15, 2013 6:07 am
Posts: 24
Location: Oran, Algeria
pixe656 wrote:
There is no need to use plugins just for this:
dim x as Double
x= 2.68798271729777e43
msgbox "str="+str(x)+" format="+format(x,"0.0000000000000000000000000e00")


To understand format and other functions/features, you have the RS documentation online: http://docs.realsoftware.com/index.php/Main_Page

You also have a folder in your machine with many examples that come with the IDE, and there is the RB curriculum, which can help you getting used to RB

Pixe


Than you for your help, for the link also.
Other question, i do not found Date time control in Rbasic, I add MS DTPicker date time, but time control does not run , no possible to display the system time.
Any idea ?


Top
 Profile  
Reply with quote  
 Post subject: Re: RB Benchmark
PostPosted: Wed Feb 20, 2013 4:46 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
You can find prices on our website for Util plugin or Complete package:
http://www.monkeybreadsoftware.de/realbasic/buy/

Price depends on your country and VAT status.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: SPRINTF for FREE
PostPosted: Wed Feb 20, 2013 7:35 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
Want to use "sprintf" in RealStudio (OSX only) and FOR FREE?
well here is an alternative.... Note : it does use SHELL .... but I did say it was free didn't I?

FUNCTION sprintf(fmt as string,num as double) As String
Dim sh As New shell
Dim x As Integer
Dim s As String
' for more information execute "MAN printf" from terminal
' note : use of ' is not properly documented... but does work
x=InStr(fmt,"'") ' apply thousand Separator
If x>1 And Mid(fmt,x-1)<>"\" Then fmt=Left(fmt,x-1)+"\"+Mid(fmt,x) ' make sure ' is escaped
sh.execute "printf "+fmt+" "+Str(num)
x=sh.ErrorCode
s=sh.result
If x=0 Then Return s
// an error occured
s=NthField(ReplaceLineEndings(s,EndOfLine.UNIX),EndOfLine.UNIX,1)
x=InStr(s,"line")
x=InStr(x,s,":")
Return Trim(Mid(s,x+1))
END FUNCTION

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: RB Benchmark
PostPosted: Wed Feb 20, 2013 8:41 pm 
Offline

Joined: Wed Mar 22, 2006 11:15 am
Posts: 712
Location: Southern California
I've kept a current license to MBS for years. My license will sometimes lapse for a few months until I notice I need/want an upgrade, but Christian has stuffed an unbelievable amount of code and functionality into that thing. Once or twice I've run across a function in MBS that already exists in RB, but basically it's there because MBS had it first and/or adds some feature.

Einhugur's plugin is another one I keep a license to. They have cross platform date and time controls, btw.

_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/


Top
 Profile  
Reply with quote  
 Post subject: Re: RB Benchmark
PostPosted: Sat Mar 30, 2013 12:25 pm 
Offline

Joined: Sun Sep 21, 2008 6:56 pm
Posts: 8
Djamel wrote:
Other question, i do not found Date time control in Rbasic, I add MS DTPicker date time, but time control does not run , no possible to display the system time.
Any idea ?


You can try my CalendarControl. It is a Canvas subclass for a date chooser/calendar. Fully cross-platform.

http://www.pidog.com/CalendarControl/

Thanks,
Jim McKay
piDog.com


Top
 Profile  
Reply with quote  
 Post subject: Re: RB Benchmark
PostPosted: Sun Mar 31, 2013 11:08 pm 
Offline
User avatar

Joined: Sun Jan 25, 2009 5:11 pm
Posts: 576
Location: Guatemala, Central America
jimmckay wrote:
Djamel wrote:
Other question, i do not found Date time control in Rbasic, I add MS DTPicker date time, but time control does not run , no possible to display the system time.
Any idea ?


You can try my CalendarControl. It is a Canvas subclass for a date chooser/calendar. Fully cross-platform.

http://www.pidog.com/CalendarControl/

Thanks,
Jim McKay
piDog.com


I was going to give it a try but first wanted to check the price but I can't find it in your store. Am I looking in the wrong place?

http://www.pidog.com/store.shtml

_________________
Future RS guru.
Ride the world!


Top
 Profile  
Reply with quote  
 Post subject: Re: RB Benchmark
PostPosted: Tue Apr 02, 2013 12:47 pm 
Offline
User avatar

Joined: Fri Jul 09, 2010 7:16 am
Posts: 103
Location: Den Haag, Netherlands
http://www.pidog.com/Modules.shtml
($60 single user, 1 year update single user $20)

_________________
MacBook Pro (late 2008), OSX Mountain Lion 10.8.2, Real Studio 2012r2


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group