Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 16th April 2008, 15:32
olliwest olliwest is offline
Junior Member
 
Join Date: Apr 2008
Location: Freiburg, Germany
Posts: 18
olliwest is on a distinguished road
Baan: LN - DB: Oracle - OS: Windows
read a *.txt file with seq.gets()
Baan: ERP LN 6.1
C/S: Both

Hello together,

i'm a beginner in developing tools for baan.
i like read a textfile and to compare with an argument, and if true do...
and if false do...

now have the textfile several lines, i tryed with:

while(ret = 0)
ret = seq.gets(stringline,500,seq.id)
if ret = 0 then
if stringline(1;7)="RUNNING" then
message("....")
break
|start.status_ok()
else
message("...")
break
|start.status_off()
endif
endif
endwhile

i need the information in thr 5. line of the text file, it works only in the first.

can everbody help me??

;-)
Reply With Quote
  #2  
Old 16th April 2008, 17:13
rduncan10's Avatar
rduncan10 rduncan10 is offline
Senior Member
 
Join Date: Feb 2007
Location: Cambridge, ON Canada
Posts: 116
rduncan10 is on a distinguished road
Baan: IVc4 - DB: Oracle 10g - OS: SUSE Linux
I think the "BREAK" statements might be breaking the WHILE loop. You don't need to use BREAK between IF and ENDIF.

By the way, you can simplify the code somewhat if you replace the first three lines with:
while not seq.gets(stringline,500,seq.id)

And take out one of the "endifs" before "endwhile".

Rob
Reply With Quote
  #3  
Old 21st April 2008, 23:53
pvandyk pvandyk is offline
Junior Member
 
Join Date: Apr 2008
Posts: 4
pvandyk is on a distinguished road
Baan: BaanIV, LN - DB: Oracle - OS: Unix
Correct, the "break" statements are doing exactly that: breaking you out of the while loop. A "break" is used when you want to exit an iteration loop early. As a generalization, this means you rarely use it in For and While loops but almost always use it with Case Statements.
Thank you,
pvandyk
Reply With Quote
Sponsored Links
  #4  
Old 22nd April 2008, 08:42
olliwest olliwest is offline
Junior Member
 
Join Date: Apr 2008
Location: Freiburg, Germany
Posts: 18
olliwest is on a distinguished road
Baan: LN - DB: Oracle - OS: Windows
break

thanks...
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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Question mr_suleyman Tools Development 37 11th November 2016 08:14
Undocumented Functions & Variables george7a Tools Development 81 30th September 2015 11:35
Update line in file mrubik Miscellaneous 3 14th June 2005 13:18


All times are GMT +2. The time now is 05:00.


©2001-2017 - Baanboard.com - Baanforums.com