Buchempfehlung
Windows-Programmierung. Das Entwicklerhandbuch zur WIN32-API
Windows-Programmierung. Das Entwicklerhandbuch zur WIN32-API
"Der" Petzold, das über 1000 Seiten starke Standardwerk zum Win32-API - besonders nützlich u. a. bei der GUI-Programmierung in FreeBASIC! [Mehr Infos...]
FreeBASIC-Chat
Es sind Benutzer im FreeBASIC-Chat online.
(Stand:  )
FreeBASIC bei Twitter
Twitter FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!

fb:porticula NoPaste

Info
Info / Hilfe
Liste
Übersicht / Liste
Neu
Datei hochladen
Suche
Quellcode suchen
Download
Dateidownload

Nur Testcode

Uploader:MitgliedAndy19312
Datum/Zeit:06.02.2009 22:36:30

OPEN COM "COM4:4800,N,8,1,cs0,cd0,ds0,rs" FOR BINARY AS #1

DIM buffer AS STRING
Dim i as uinteger
dim ii as uinteger
Dim links as string
Dim rechts as string
Dim array(1 to 100) as string
Dim a as uinteger
Dim mitte as string


DO UNTIL INKEY$<>""
    cls
    a = 0
  IF LOC(1) > 0 THEN
    buffer = SPACE( LOC(1) )
    GET #1, , buffer
    'PRINT buffer

    Dim laenge as uinteger
    laenge = len(buffer)



        for i = 1 to laenge
        links = left (buffer,i)
        rechts = right(links,1)

        if rechts = "$" then
            a = a + 1

            mitte = mid (buffer,i,100)

            if a = 1 then
                array(1) = mitte
            end if
            if a = 2 then
                array(2) = mitte
            end if
            if a = 3 then
                array(3) = mitte
            end if
            if a = 4 then
                array(4) = mitte
            end if
            if a = 5 then
                array(5) = mitte
            end if
            if a = 6 then
                array(6) = mitte
            end if
            if a = 7 then
                array(7) = mitte
            end if
            if a = 8 then
                array(8) = mitte
            end if
            if a = 9 then
                array(9) = mitte
            end if
            if a = 10 then
                array(10) = mitte
            end if
            if a = 11 then
                array(11) = mitte
            end if
            if a = 12 then
                array(12) = mitte
            end if
            if a = 13 then
                array(13) = mitte
            end if
            if a = 14 then
                array(14) = mitte
            end if
            if a = 15 then
                array(15) = mitte
            end if
            if a = 16 then
                array(16) = mitte
            end if
            if a = 17 then
                array(17) = mitte
            end if
            if a = 18 then
                array(18) = mitte
            end if
            if a = 19 then
                array(19) = mitte
            end if




        end if

    next
    print "Zeile 1:  ";array(1)
    print
    print "ist ein:";

            for ii = 1 to 1
            mitte = mid(array(1),1,6)
            if mitte = "$GPRMC" then
            print "GPRMC Datensatz"
            OPEN "c:\GPS_Daten\GPRMC.txt" FOR OUTPUT AS #2
            WRITE #2, array(1)
            CLOSE #2

            end if
            if mitte = "$GPRMB" then
            print "GPRMB Datensatz"
            OPEN "c:\GPS_Daten\GPRMB.txt" FOR OUTPUT AS #2
            WRITE #2, array(1)
            CLOSE #2
            end if
            if mitte = "$GPGGA" then
            print "GPGGA Datensatz"
            OPEN "c:\GPS_Daten\GPGGA.txt" FOR OUTPUT AS #2
            WRITE #2, array(1)
            CLOSE #2
            end if
            if mitte = "$GPGSA" then
            print "GPGSA Datensatz"
            OPEN "c:\GPS_Daten\GPGSA.txt" FOR OUTPUT AS #2
            WRITE #2, array(1)
            CLOSE #2
            end if
        next


    buffer = ""

  END IF

  sleep 3000
LOOP

CLOSE #1