Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Newbie Questions

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-05-2008, 06:26 PM
Junior Member
 
Join Date: Apr 2008
Location: FRANCE
Posts: 13
Default Newbie Questions

Hi there,

Two little questions:

How to dispaly (using 'Format')
1.2345678 like this 001.123
something like Format(1.23456,"D3F3") ?

and then

Dim Type (name,age) person
Dim Type (name,age) other_person

How to copy directly person => other_person

whithout made:
other_person.name=person.name
other_person.age=person.age

Many thanks !!!!!
Bruno.
Reply With Quote
  #2 (permalink)  
Old 05-05-2008, 06:39 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You can copy the struct with ArrayCopy:
Code:
ArrayCopy(person(),0,2,other_Person(),0)
Format:
You will need to treat differently the whole part and the fraction part.
Code:
Sub App_Start
    
Msgbox(SpecialFormat(1.2345678)) 'will display 001.235
End Sub

Sub SpecialFormat(num)
    frac = Format(num - 
Int(num),"F3")
    
Return Format(Int(num),"d3") & SubString(frac,1,StrLength(frac)-1)
End Sub
Reply With Quote
  #3 (permalink)  
Old 05-05-2008, 06:45 PM
Junior Member
 
Join Date: Apr 2008
Location: FRANCE
Posts: 13
Default

Thanks Erel,

PS: Very useful Basic4PPC !!!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
A few questions regarding FormLib N1c0_ds Questions (Windows Mobile) 6 09-19-2008 02:34 AM
More SQL questions HARRY Questions (Windows Mobile) 2 01-04-2008 10:15 AM
SQL Questions tcgoh Questions (Windows Mobile) 7 12-31-2007 09:10 AM
Newbie questions stratus Questions (Windows Mobile) 2 11-13-2007 01:21 PM
2 questions about Outlook Alex812 Questions (Windows Mobile) 1 08-27-2007 06:54 PM


All times are GMT. The time now is 09:23 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0