It is currently Sat Sep 23, 2017 5:23 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [AmigaOS] BUG GetCLIArg
PostPosted: Fri May 09, 2014 9:45 am 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1529
Location: In a long distant galaxy
Hi PB Team,

I know it is not common to ask this.

2 years here without any post relating to the amiga version :?

But well, i take my chance. Is it still possible to make bug reports for the lastest amiga version of purebasic :?:

So here it is :

GetCLIArg() is not a recognized function while NumberOfCLIArgs() is recognized.

I think there was a mismatch with the others pb forks because ProgramParameter() is recognized but not documented nor working as expected.

Sorry again Fred for this uncommon bug report :mrgreen:

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
Reply with quote  
 Post subject: Re: [AmigaOS] BUG GetCLIArg
PostPosted: Fri May 09, 2014 9:47 am 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1529
Location: In a long distant galaxy
Some code here - the others parts of the code is ok :

Code:
;*******************************
;** AmigaOS/MUITextEdit.mcc   **
;** Suppression des codes ESC **
;*******************************

EnableExplicit

Global file.s, plaintext.s, line.s, i, n, c

If NumberOfCLIArgs() = 0
  file = FileRequester(0)
Else
  file = ProgramParameter() ; GetCLIArg()
EndIf

If file = ""
  PrintN("Argument missing")
  End
EndIf

If ReadFile(0, file)
  While Eof() = 0
    plaintext = ""
    line = ReadString()
    n = Len(line)
    i = 1
    While i <= n
      c = Asc(Mid(line, i, 1))
      If c = 27
        i + 1
        While i <= n
          c = Asc(Mid(line, i, 1))
          Select c
            Case 'b', 'i', 'n', 'u':
              i + 1
              Break
            Case 'p':
              While i <= n
                c = Asc(Mid(line, i, 1))
                i + 1
                If c = ']'
                  Break
                EndIf
              Wend
              Break
          EndSelect
        Wend
      Else
        plaintext + Chr(c)
        i + 1
      EndIf
    Wend
    PrintN(plaintext)
  Wend
  CloseFile(0)
Else
  PrintN("Can't open file")
EndIf

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
Reply with quote  
 Post subject: Re: [AmigaOS] BUG GetCLIArg
PostPosted: Fri May 09, 2014 10:08 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13102
Location: France
The AmigaOS version is opensource, so we won't do any fix for it. You can take a look to the command to try to fix it :P


Top
 Profile  
Reply with quote  
 Post subject: Re: [AmigaOS] BUG GetCLIArg
PostPosted: Fri May 09, 2014 10:32 am 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1529
Location: In a long distant galaxy
Thank you for your very quick response Fred.

So it is OpenSource, That's is the good news but not the compiler if i remember well. For external libs it's OK i think...

i can try myself but it could take a while before i manage to fix my problem and make an environment for recompiling all the amiga stuff.

If i do that, may i bother you for future question related to the needed development env ?

Of course, I will try to not bother you with stupid questions.

Have a good day.

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
Reply with quote  
 Post subject: Re: [AmigaOS] BUG GetCLIArg
PostPosted: Thu Jun 25, 2015 2:10 am 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 05, 2004 9:05 pm
Posts: 103
Location: germany
Quote:
Is it still possible to make bug reports for the lastest amiga version of purebasic

do it!

_________________
Kultstudio


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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