It is currently Wed May 22, 2013 5:11 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Assignment of float value fails (Linux 32-bit only)
PostPosted: Mon Mar 05, 2012 8:35 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Dec 03, 2011 5:54 pm
Posts: 252
Hi,

Today I came across the following error:

Code:
Structure Value
  String.s
  Float.f
EndStructure

Global NewMap Values.Value()

Procedure Add1(Id, Value.f)
  Ids.s = Str(Id) ;<--- that way it works
  With Values(Ids)
    \String = StrF(Value)
    \Float = Value
  EndWith
EndProcedure
Procedure Add2(Id, Value.f)
  With Values(Str(Id)) ;<--- due to this line ...
    \String = StrF(Value)
    \Float = Value ;<--- ... the assignment of float value fails
  EndWith
EndProcedure

Add1(0, 1.23)
Add2(1, 2.34)

For i = 0 To 1
  Debug Values(Str(i))\String
  Debug Values(Str(i))\Float 
Next


When you run this code, the assignment of the float value within the Add2() procedure fails. This only happen on on Linux 32-bit (Fedora 16). On Fedora 16 64-bit and Windows 7 32-bit it runs as expected.

Best regards
Uwe

_________________
Purebasic 5.11 | Fedora 18 (32-bit)


Top
 Profile  
 
 Post subject: Re: Assignment of float value fails (Linux 32-bit only)
PostPosted: Mon Mar 12, 2012 12:27 am 
Offline
Addict
Addict

Joined: Fri Oct 23, 2009 2:33 am
Posts: 2860
Location: Wales, UK
Confirm that it works fine on WinXP 32bit too.

Needs more Linux Users to test on the various distros in order to be sure it's a PB issue and not a Fedora issue.

So come Linux people, don't be shy!

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
 
 Post subject: Re: Assignment of float value fails (Linux 32-bit only)
PostPosted: Mon Mar 12, 2012 1:00 am 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 2485
Location: New Zealand
fails on ubuntu 11.10 x68 too


Top
 Profile  
 
 Post subject: Re: Assignment of float value fails (Linux 32-bit only)
PostPosted: Mon Mar 12, 2012 11:38 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Apr 25, 2003 9:27 pm
Posts: 138
Location: Kent, UK
Works ok on Mint 10 64bit.

_________________
Regards

Andy

Image
Registered PB & PureVision User


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye