Version 1.00 - 18.04.2019
Das Modul stellt Funktionen zur Verfügung, um die (günstigsten) Benzinpreise zu einer Adresse in Deutschland und Österreich automatisch zu ermitteln.
Die Preise werden online über http://www.spritpreismonitor.de (für Deustchland) und http://www.e-control.at (für Österreich) abgefragt und entsprechend aufbereitet, so dass alle Daten zur Weiterverarbeitung in einem strukturierten Array vorliegen.
Den beiden Prozeduren GetStationsDE und GetStationsAT werden dabei die GEO-Koordinaten übergeben, die den geografischen Punkt beschreiben in dessen Umkreis die Tankstellen- bzw. Preissuche erfolgen soll.
Code: Alles auswählen
GetStationsDE(sLatitude.s, sLongitude.s, sFuel.s, sUmkreis.s, Array stOutStations.stations(1))
GetStationsAT(sLatitude.s, sLongitude.s, sFuel.s, Array stOutStations.stations(1))
Code: Alles auswählen
Structure stations
iRang.i ; 0, 1, 2... günstigster zuerst
sMarke.s
sName.s
sStrasse.s
sPLZ.s
sOrt.s
sSorte.s
sPreis.s ; Preis als String mit Dezimalpunkt (z.B. "1.439")
iPreis.i ; Preis * 1000 als Integer ohne Dezimalpunkt (z.B. 1439)
EndStructure
Die nötigen Geo-Koordinaten können mit meinem anderen Modul "AddressToGeo" erzeugt werden. Dieses Modul ermittelt zu einer regulären Adresse die zugehörigen Geo-Koordinaten.
Das Modul "AddressToGeo" ist hier zu finden: viewtopic.php?f=8&t=29821
Das Modul "GasStationsPrices" besitzt einen mit CompilerIf gekapselten Democode der die Funktion anhand von Beispielen erklärt. Die Rückgabe des Democodes sieht z.B. so aus:
Code: Alles auswählen
Spritpreise im Umkreis von 5 Km für folgende Adresse: Hauptstraße 4, 10827 Berlin
Diesel
Platz 1: € 1.229 |-> SB-Markttankstelle, SB-Markttankstelle Berlin Bessemer Str., Bessemer Str. 57, 12103 Berlin
Platz 2: € 1.239 |-> JET, JET BERLIN KREUZBERGSTR. 41, KREUZBERGSTR. 41 , 10965 BERLIN
Platz 3: € 1.239 |-> HEM, Berlin, Attilastr. 124, Attilastr. 124, 12105 Berlin
Platz 4: € 1.239 |-> Shell, BERLIN, ORANIENSTR., ORANIENSTR. 138 , 10969 BERLIN
Platz 5: € 1.239 |-> Sprint, Sprint Berlin Reuter Str., Reuter Str. 18-19, 12043 Berlin
... usw.
Code: Alles auswählen
;*************************************************************************
;* GasStationsPrices (c) Kurzer
;*************************************************************************
;*
;* Modulname : GasStationsPrices
;* Filename : mod_GasStationsPrices.pbi
;* Filetype : Module [MainApp, Formular, Include, Module, Data]
;* Programming lang. : Purebasic 5.62+
;* String-Format : Unicode [Ascii, Unicode, All]
;* Platform : Windows [Windows, Mac, Linux, All]
;* Processor : All [x86, x64, All]
;* Compileroptions : -
;* Version : 1.00
;* Date : 18.04.2019
;* Autor : Kurzer
;* Dependencies :
;* -----------------------------------------------------------------------
;* Description:
;*
;* The module provides functions to automatically determine petrol prices
;* in Germany and Austria. The prices are queried online from www.spritpreismonitor.de
;* (for Germany) and www.e-control.at (for Austria) and prepared accordingly.
;*
;* The two procedures GetStationsDE() and GetStationsAT() are given the geo
;* coordinates which describe the geographical point, in whose periphery the
;* gas station resp. price search should take place.
;*
;* The procedures return the number of the determined petrol stations. The price
;* and petrol station data are returned via an output array, which is passed
;* to the procedure as a reference parameter.
;*
;* Both procedures have a slightly different parameter set. All parameters are
;* described in the procedure comments.
;* For example, a radius can be specified for the German query in which petrol
;* stations are to be searched. This is not possible for the Austria query,
;* since only the 5 cheapest petrol stations are returned. These restrictions
;* result from the corresponding functionality of the websites which are used
;* for price determination.
;*
;* Btw: The necessary geo coordinates can be generated with my other module
;* "AddressToGeo". This module determines the corresponding geo coordinates
;* (latitude & longitude) for a regular address.
;*
;* The module "AddressToGeo" can be found here:
;* English-Forum: https://www.purebasic.fr/english/viewtopic.php?f=27&t=66616
;* German-Forum : https://www.purebasic.fr/german/viewtopic.php?f=8&t=29821
;* -----------------------------------------------------------------------
;* Changelog:
;* 1.00 - rel 18.04.2019:
;* First release
;* -----------------------------------------------------------------------
;* English-Forum :
;* French-Forum :
;* German-Forum : https://www.purebasic.fr/german/viewtopic.php?f=8&t=31409
;* -----------------------------------------------------------------------
;* License: MIT License
;*
;* Copyright (c) 2016/19 Kurzer
;*
;* Permission is hereby granted, free of charge, to any person obtaining a copy
;* of this software and associated documentation files (the "Software"), to deal
;* in the Software without restriction, including without limitation the rights
;* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;* copies of the Software, and to permit persons to whom the Software is
;* furnished to do so, subject to the following conditions:
;*
;* The above copyright notice and this permission notice shall be included in all
;* copies or substantial portions of the Software.
;*
;* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
;* SOFTWARE.
;*
;* ---------------- German translation of the MIT License ----------------
;*
;* MIT Lizenz:
;*
;* Hiermit wird unentgeltlich jeder Person, die eine Kopie der Software und der
;* zugehörigen Dokumentationen (die "Software") erhält, die Erlaubnis erteilt,
;* sie uneingeschränkt zu nutzen, inklusive und ohne Ausnahme mit dem Recht, sie
;* zu verwenden, zu kopieren, zu verändern, zusammenzufügen, zu veröffentlichen,
;* zu verbreiten, zu unterlizenzieren und/oder zu verkaufen, und Personen, denen
;* diese Software überlassen wird, diese Rechte zu verschaffen, unter den folgenden
;* Bedingungen:
;*
;* Der obige Urheberrechtsvermerk und dieser Erlaubnisvermerk sind in allen Kopien
;* oder Teilkopien der Software beizulegen.
;*
;* DIE SOFTWARE WIRD OHNE JEDE AUSDRÜCKLICHE ODER IMPLIZIERTE GARANTIE BEREITGESTELLT,
;* EINSCHLIEßLICH DER GARANTIE ZUR BENUTZUNG FÜR DEN VORGESEHENEN ODER EINEM BESTIMMTEN
;* ZWECK SOWIE JEGLICHER RECHTSVERLETZUNG, JEDOCH NICHT DARAUF BESCHRÄNKT. IN KEINEM
;* FALL SIND DIE AUTOREN ODER COPYRIGHTINHABER FÜR JEGLICHEN SCHADEN ODER SONSTIGE
;* ANSPRÜCHE HAFTBAR ZU MACHEN, OB INFOLGE DER ERFÜLLUNG EINES VERTRAGES, EINES DELIKTES
;* ODER ANDERS IM ZUSAMMENHANG MIT DER SOFTWARE ODER SONSTIGER VERWENDUNG DER SOFTWARE
;* ENTSTANDEN.
;*************************************************************************
DeclareModule GasStationsPrices
;- --- [Module declaration / public elements] ------------------------------------------
;-
;*************************************************************************
;- Compiler directives
;*************************************************************************
EnableExplicit
;*************************************************************************
;- Macros
;*************************************************************************
;*************************************************************************
;- Constants
;*************************************************************************
#FUEL_DIESEL_DE = "diesel"
#FUEL_SUPER_DE = "e5"
#FUEL_SUPERE10_DE = "e10"
#UMKREIS_5_DE = "5"
#UMKREIS_10_DE = "10"
#UMKREIS_15_DE = "15"
#UMKREIS_20_DE = "20"
#FUEL_DIESEL_AT = "DIE"
#FUEL_SUPER_AT = "SUP"
#FUEL_CNGGAS_AT = "GAS"
;*************************************************************************
;- Structures
;*************************************************************************
Structure stations
iRang.i ; 0, 1, 2... günstigster zuerst
sMarke.s
sName.s
sStrasse.s
sPLZ.s
sOrt.s
sSorte.s
sPreis.s ; Preis als String mit Dezimalpunkt (z.B. "1.439")
iPreis.i ; Preis * 1000 als Integer ohne Dezimalpunkt (z.B. 1439)
EndStructure
;*************************************************************************
;- Variables, Arrays, Linked Lists, Maps
;*************************************************************************
;*************************************************************************
;- Interfaces, Prototypes
;*************************************************************************
;*************************************************************************
;- Public Procedures (dec)
;*************************************************************************
Declare.i GetStationsDE(sLatitude.s, sLongitude.s, sFuel.s, sUmkreis.s, Array stOutStations.stations(1))
Declare.i GetStationsAT(sLatitude.s, sLongitude.s, sFuel.s, Array stOutStations.stations(1))
EndDeclareModule
Module GasStationsPrices
;-
;- --- [Module implementation / private elements] -----------------------------------------
;-
;*************************************************************************
;- Constants
;*************************************************************************
#URLDE = "https://www.spritpreismonitor.de/suche/?tx_spritpreismonitor_pi1%5BsearchRequest%5D%5BplzOrtGeo%5D=#LA#%2C#LO#&tx_spritpreismonitor_pi1%5BsearchRequest%5D%5Bumkreis%5D=#UMK#&tx_spritpreismonitor_pi1%5BsearchRequest%5D%5Bkraftstoffart%5D=#FUEL#&tx_spritpreismonitor_pi1%5BsearchRequest%5D%5Btankstellenbetreiber%5D="
#URLAT = "https://api.e-control.at/sprit/1.0/search/gas-stations/by-address?latitude=#LA#&longitude=#LO#&fuelType=#FUEL#&includeClosed=false"
;*************************************************************************
;- Private Procedures (imp)
;*************************************************************************
Procedure.s GetStringPart(sString.s, sStartDelimiter.s, sEndDelimiter.s, iPartLength=0)
; +-----------------------------------------------------------------
; |Description : Extrahiert aus einem String ein Teilstück, welches durch sStartDelimiter und sEndDelimiter eingeschlossen ist
; |Arguments : sString : String aus dem der Teilstring extrahiert werden soll
; | : sStartDelimiter: Linker Begrenzungsstring
; | : sEndDelimiter : Rechter Begrenzungsstring
; | : iPartLength : Wenn > 0, dann wird sEndDelimiter ignoriert und ein Teilstring mit der Länge iPartLength zurückgegeben
; |Results : Ermittelter Teilstring bzw. "", wenn sStartDelimiter nicht vorhanden ist oder Fehler auftraten
; |Remarks : Kommen die Delimiter mehrfach vor, dann wird nur das erste Auftreten gefunden!
; +-----------------------------------------------------------------
Protected.i iPos1, iPos2
iPos1 = FindString(sString, sStartDelimiter) + Len(sStartDelimiter)
If iPos1 > 0
If iPartLength = 0
iPos2 = FindString(sString, sEndDelimiter, iPos1)
Else
iPos2 = iPos1 + iPartLength
EndIf
If iPos2 > iPos1
ProcedureReturn Mid(sString, iPos1, iPos2 - iPos1)
Else
ProcedureReturn ""
EndIf
Else
ProcedureReturn ""
EndIf
EndProcedure
;*************************************************************************
;- Public Procedures (imp)
;*************************************************************************
Procedure.i GetStationsDE(sLatitude.s, sLongitude.s, sFuel.s, sUmkreis.s, Array stOutStations.stations(1))
; +-----------------------------------------------------------------
; |Description : Ermittelt zu einer Geoposition in Deutschland die günstigsten Tankstellen im Umkreis von 5 Km
; |Arguments : sLatitude : Breitengrad (mit Dezimalpunkt)
; | : sLongitude : Längengrad (mit Dezimalpunkt)
; | : sFuel : Benzinsorte (Kürzel: #FUEL_DIESEL_DE, #FUEL_SUPER_DE)
; | : sUmkreis : Suchradius (Kürzel: #UMKREIS_5_DE, #UMKREIS_10_DE ...)
; | : stOutStations: Strukturiertes Array zur Aufnahme der Ergebnis-Einträge
; | : Es wird per ReDim() passend dimensioniert
; |Results : Anzahl der in das Array eingefügten Einträge. Bei Fehler = 0
; |Remarks : -
; +-----------------------------------------------------------------
Protected.s sUrl, sResult, sLastlabel
Protected *ReceiveBuffer, i, iElementCount
; JSON Daten von spritpreismonitor herunterladen
If sUmkreis ="" : sUmkreis = "5" : EndIf
sUrl = #URLDE
sUrl = ReplaceString(sUrl, "#LA#", sLatitude)
sUrl = ReplaceString(sUrl, "#LO#", sLongitude)
sUrl = ReplaceString(sUrl, "#FUEL#", sFuel)
sUrl = ReplaceString(sUrl, "#UMK#", sUmkreis)
*ReceiveBuffer = ReceiveHTTPMemory(sUrl)
If *ReceiveBuffer
sResult = PeekS(*ReceiveBuffer, MemorySize(*ReceiveBuffer), #PB_UTF8|#PB_ByteLength)
FreeMemory(*ReceiveBuffer)
Else
ProcedureReturn 0
EndIf
sResult = GetStringPart(sResult, "spmResult = ", "}];") + "}]"
; JSON Daten in die Struktur extrahieren
If ParseJSON(0, sResult)
; Das Out-Array passend dimensionieren
iElementCount = JSONArraySize(JSONValue(0))
If iElementCount > 0
iElementCount - 1
ReDim stOutStations(iElementCount)
; Datensätze extrahieren
For i = 0 To iElementCount
stOutStations(i)\sMarke = GetJSONString(GetJSONMember(GetJSONElement(JSONValue(0), i), "marke"))
stOutStations(i)\sName = GetJSONString(GetJSONMember(GetJSONElement(JSONValue(0), i), "name"))
stOutStations(i)\sStrasse = GetJSONString(GetJSONMember(GetJSONElement(JSONValue(0), i), "strasse"))
stOutStations(i)\sStrasse + " " + GetJSONString(GetJSONMember(GetJSONElement(JSONValue(0), i), "hausnr"))
stOutStations(i)\sPLZ = GetJSONString(GetJSONMember(GetJSONElement(JSONValue(0), i), "plz"))
stOutStations(i)\sOrt = GetJSONString(GetJSONMember(GetJSONElement(JSONValue(0), i), "ort"))
stOutStations(i)\sPreis = GetJSONString(GetJSONMember(GetJSONElement(JSONValue(0), i), sFuel))
stOutStations(i)\iPreis = 1000 * ValF(stOutStations(i)\sPreis)
If sFuel = #FUEL_SUPER_DE
stOutStations(i)\sSorte = "Super"
ElseIf sFuel = #FUEL_SUPERE10_DE
stOutStations(i)\sSorte = "Super E10"
ElseIf sFuel = #FUEL_DIESEL_DE
stOutStations(i)\sSorte = "Diesel"
EndIf
Next i
; Datensätze nach Preis ausfsteigend sortieren
SortStructuredArray(stOutStations(), #PB_Sort_Ascending, OffsetOf(stations\iPreis), TypeOf(stations\iPreis))
For i = 0 To iElementCount
stOutStations(i)\iRang = i + 1
Next i
EndIf
FreeJSON(0)
Else
ProcedureReturn 0
EndIf
ProcedureReturn i ; ArraySize(stOutStations())
EndProcedure
Procedure.i GetStationsAT(sLatitude.s, sLongitude.s, sFuel.s, Array stOutStations.stations(1))
; +-----------------------------------------------------------------
; |Description : Ermittelt zu einer Geoposition in Österreich die fünf günstigsten Tankstellen im Umkreis
; |Arguments : sLatitude : Breitengrad (mit Dezimalpunkt)
; | : sLongitude : Längengrad (mit Dezimalpunkt)
; | : sFuel : Benzinsorte (Kürzel: #FUEL_DIESEL_AT, #FUEL_SUPER_AT)
; | : stOutStations: Strukturiertes Array zur Aufnahme der Ergebnis-Einträge
; | : Es wird per ReDim() passend dimensioniert
; |Results : Anzahl der in das Array eingefügten Einträge. Bei Fehler = 0
; |Remarks : -
; +-----------------------------------------------------------------
Protected.s sUrl, sResult, sLastlabel
Protected.i *ReceiveBuffer, i, iElementCount
; JSON Daten von e-control herunterladen
sUrl = #URLAT
sUrl = ReplaceString(sUrl, "#LA#", sLatitude)
sUrl = ReplaceString(sUrl, "#LO#", sLongitude)
sUrl = ReplaceString(sUrl, "#FUEL#", sFuel)
*ReceiveBuffer = ReceiveHTTPMemory(sUrl)
If *ReceiveBuffer
sResult = PeekS(*ReceiveBuffer, MemorySize(*ReceiveBuffer), #PB_UTF8|#PB_ByteLength)
FreeMemory(*ReceiveBuffer)
Else
ProcedureReturn 0
EndIf
; JSON Daten in die Struktur extrahieren
If ParseJSON(0, sResult, #PB_JSON_NoCase)
; Das Out-Array passend dimensionieren
iElementCount = JSONArraySize(JSONValue(0))
If iElementCount > 0
iElementCount - 1
ReDim stOutStations(iElementCount)
; Datensätze extrahieren
For i = 0 To iElementCount
stOutStations(i)\sName = GetJSONString(GetJSONMember(GetJSONElement(JSONValue(0), i), "name"))
stOutStations(i)\sMarke = stOutStations(i)\sName
stOutStations(i)\sStrasse = GetJSONString(GetJSONMember(GetJSONMember(GetJSONElement(JSONValue(0), i), "location"), "address"))
stOutStations(i)\sPLZ = GetJSONString(GetJSONMember(GetJSONMember(GetJSONElement(JSONValue(0), i), "location"), "postalCode"))
stOutStations(i)\sOrt = GetJSONString(GetJSONMember(GetJSONMember(GetJSONElement(JSONValue(0), i), "location"), "city"))
If sFuel = #FUEL_SUPER_AT
stOutStations(i)\sSorte = "Super"
ElseIf sFuel = #FUEL_DIESEL_AT
stOutStations(i)\sSorte = "Diesel"
ElseIf sFuel = #FUEL_CNGGAS_AT
stOutStations(i)\sSorte = "CNG Gas"
EndIf
If JSONArraySize(GetJSONMember(GetJSONElement(JSONValue(0), i), "prices")) > 0
stOutStations(i)\sPreis = StrF(GetJSONFloat(GetJSONMember(GetJSONElement(GetJSONMember(GetJSONElement(JSONValue(0), i), "prices"), 0), "amount")), 3)
stOutStations(i)\iPreis = 1000 * ValF(stOutStations(i)\sPreis)
Else
stOutStations(i)\sPreis = "9999"
stOutStations(i)\iPreis = 9999
EndIf
Next i
; Datensätze nach Preis ausfsteigend sortieren
SortStructuredArray(stOutStations(), #PB_Sort_Ascending, OffsetOf(stations\iPreis), TypeOf(stations\iPreis))
For i = 0 To iElementCount
stOutStations(i)\iRang = i + 1
Next i
EndIf
FreeJSON(0)
Else
ProcedureReturn 0
EndIf
ProcedureReturn i
EndProcedure
;*************************************************************************
;- Data Section
;*************************************************************************
DataSection
EndDataSection
EndModule
;-------------------------------------------------------------------------------
;- Main
CompilerIf #PB_Compiler_IsMainFile
EnableExplicit
Procedure Main()
Protected.i i, iStationCount
InitNetwork()
UseModule GasStationsPrices
Protected Dim stStationsDiesel.stations(0)
Protected Dim stStationsSuper.stations(0)
Protected Dim stStationsGasE10.stations(0)
Debug "Spritpreise im Umkreis von 5 Km für folgende Adresse: Hauptstraße 4, 10827 Berlin"
Debug "Diesel"
iStationCount = GetStationsDE("52.4899871", "13.359534", #FUEL_DIESEL_DE, #UMKREIS_5_DE, stStationsDiesel())
If iStationCOunt > 5 : iStationCOunt = 5 : EndIf
For i = 0 To iStationCount - 1
Debug "Platz " + Str(stStationsDiesel(i)\iRang)+ ": € " + stStationsDiesel(i)\sPreis + " |-> " +
stStationsDiesel(i)\sMarke + ", " + stStationsDiesel(i)\sName + ", " + stStationsDiesel(i)\sStrasse + ", " +
stStationsDiesel(i)\sPLZ + " " + stStationsDiesel(i)\sOrt
Next i
Debug ""
Debug "Super E5"
iStationCOunt = GetStationsDE("52.4899871", "13.359534", #FUEL_SUPER_DE, #UMKREIS_5_DE, stStationsSuper())
If iStationCOunt > 5 : iStationCOunt = 5 : EndIf
For i = 0 To iStationCount - 1
Debug "Platz " + Str(stStationsSuper(i)\iRang)+ ": € " + stStationsSuper(i)\sPreis + " |-> " +
stStationsSuper(i)\sMarke + ", " + stStationsSuper(i)\sName + ", " + stStationsSuper(i)\sStrasse + ", " +
stStationsSuper(i)\sPLZ + " " + stStationsSuper(i)\sOrt
Next i
Debug ""
Debug "Super E10"
iStationCOunt = GetStationsDE("52.4899871", "13.359534", #FUEL_SUPERE10_DE, #UMKREIS_5_DE, stStationsGasE10())
If iStationCOunt > 5 : iStationCOunt = 5 : EndIf
For i = 0 To iStationCount - 1
Debug "Platz " + Str(stStationsGasE10(i)\iRang)+ ": € " + stStationsGasE10(i)\sPreis + " |-> " +
stStationsGasE10(i)\sMarke + ", " + stStationsGasE10(i)\sName + ", " + stStationsGasE10(i)\sStrasse + ", " +
stStationsGasE10(i)\sPLZ + " " + stStationsGasE10(i)\sOrt
Next i
Debug "-------------------"
Debug "Spritpreise der 5 günstigsten Tankstellen im Umkreis für folgende Adresse: Turmstraße 11, 4020 Linz, Österreich"
Debug "Diesel"
iStationCount = GetStationsAT("48.2790109", "14.3151684948887", #FUEL_DIESEL_AT, stStationsDiesel())
If iStationCOunt > 5 : iStationCOunt = 5 : EndIf
For i = 0 To iStationCount - 1
Debug "Platz " + Str(stStationsDiesel(i)\iRang)+ ": € " + stStationsDiesel(i)\sPreis + " |-> " +
stStationsDiesel(i)\sMarke + ", " + stStationsDiesel(i)\sName + ", " + stStationsDiesel(i)\sStrasse + ", " +
stStationsDiesel(i)\sPLZ + " " + stStationsDiesel(i)\sOrt
Next i
Debug ""
Debug "Super (es gibt in Österreich nur eine Sorte Super)"
iStationCOunt = GetStationsAT("48.2790109", "14.3151684948887", #FUEL_SUPER_AT, stStationsSuper())
If iStationCOunt > 5 : iStationCOunt = 5 : EndIf
For i = 0 To iStationCount - 1
Debug "Platz " + Str(stStationsSuper(i)\iRang)+ ": € " + stStationsSuper(i)\sPreis + " |-> " +
stStationsSuper(i)\sMarke + ", " + stStationsSuper(i)\sName + ", " + stStationsSuper(i)\sStrasse + ", " +
stStationsSuper(i)\sPLZ + " " + stStationsSuper(i)\sOrt
Next i
Debug ""
Debug "CNG Gas"
iStationCOunt = GetStationsAT("48.2790109", "14.3151684948887", #FUEL_CNGGAS_AT, stStationsGasE10())
If iStationCOunt > 5 : iStationCOunt = 5 : EndIf
For i = 0 To iStationCount - 1
Debug "Platz " + Str(stStationsGasE10(i)\iRang)+ ": € " + stStationsGasE10(i)\sPreis + " |-> " +
stStationsGasE10(i)\sMarke + ", " + stStationsGasE10(i)\sName + ", " + stStationsGasE10(i)\sStrasse + ", " +
stStationsGasE10(i)\sPLZ + " " + stStationsGasE10(i)\sOrt
Next i
UnuseModule GasStationsPrices
EndProcedure
Main()
CompilerEndIf