![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Behavior of "intOf" on a string Topic Summary: Created On: 5-Sep-2007 19:29 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Does anyone understand the behavior of the intOf function?
I wrote a sample script that is attached.
Is this a known bug, or do I not understand how the intOf function behaves. ------------------------- pete.kowalski(at)motorola.com |
|
![]() |
|
![]() |
|
With me searching the forums a little bit more here I figured by using
int fooInt = intOf(realOf(day)) seems to resolve my problem. ------------------------- pete.kowalski(at)motorola.com |
|
![]() |
|
![]() |
|
Hi Pete,
in Doors 8.1 your example code works fine and gives correct result. BTW: intOf (foo) gives correct result too ![]() Take care with parsing date strings. Starting with Doors 8, there are locales which will change the behaviour of date to string conversion. Would suggest to use (for Doors 8 or higher): string foo = stringOf (d, "d"); instead, to be sure to have the day only. Greetings Reik ------------------------- Evosoft GmbH for Siemens Industry Sector Berlin, Germany |
|
![]() |
|
![]() |
|
Thanks Reik for the information.
I ran my code in DOORS 7.1, which is used in production here. I have access to both DOORS 8.1 and 8.2 so I will do some experiements with those versions as well. ------------------------- pete.kowalski(at)motorola.com |
|
![]() |
|
![]() |
|
That code seems to work for me also. I notice that the day digits are zero padded, that is today is "06 September 2007". I adjusted it a little; you want only the first 2 characters of the date foo[0:1], not the first 3 foo[0:2] which includes the trailing space.
The code works in v7.1 and v8.1. - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Behavior of "intOf" on a string
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.