Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number to string
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00567085
Message ID:
00567093
Views:
10
Nick,

As I explained to you in another thread, you over-complicate your life. Since you're using cursors, you don't need to create unique names for them. Get rid of all names convenctions and macros and just use plain Cursor1, Cursor2, etc. names, or you can use something like CurToUpdate, curVals, etc.

You can use transform function or STR with two additional parameters. Transform is probably better here.

>I create a cCursor4 that hold character values. I have another cursor (cCursor) that contains numeric values. When I insert the number values from cCursor to cCursor4 character values using STR, it only picks up the first number.
>
>for example if I have 345.60, it picks up just 3
>
>here is my code:
>
>create cursor (cCursor4)(c1 c(7), c2 c(25), c3 c(8), c4 c(8), c5 c(8), ;
> c6 c(8), c7 c(8), c8 c(8), c9 c(8), c10 c(10))
>
>insert into (cCursor4) (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10) ;
>values(&cCursor..pp, &cCursor..fname, STR(&cCursor..totpay), STR(&cCursor..fica), ;
>			 STR(&cCursor..retire_amt), STR(&cCursor..health_ins), ;
>			 STR(&cCursor..retiree_med), STR(&cCursor..unempins), ;
>			 STR(&cCursor..wrkcompins), STR(&cCursor..total_salary))
>
>
>
>Shouldn't string convert 345.60 to "345.60" ?
>
>Thanks
>Nick Patel
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform