-
FlexPro
- Auf einen Blick
- Features & Optionen
- Einsatzgebiete
- Alle Vorteile
- Neu in FlexPro 2021
- FlexPro gratis testen
- FlexPro View OEM Freeware
- Kaufberatung
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
- Produkte
- News
- Support
- Unternehmen
- Jobs
- Kontakt
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
Creating an Array
- Dieses Thema hat 5 Antworten sowie 2 Teilnehmer und wurde zuletzt vor vor 20 Jahren, 7 Monaten von Cayouettem@bowater.com aktualisiert.
-
AutorBeiträge
-
Mai 7, 2004 um 2:42 am Uhr #12530Cayouettem@bowater.comTeilnehmer
I’m writing a function script and I was wondering how i could create an array. I am going to return that array to be plotted. Here is the code below; the variable ‘F’ should be the array for each sample taken by the variable ‘A WI soularr(v)’.
thanks,
Mathieu
CODE:
Dim F,G,H Dim c c = 0 For Each Value c In 'A WI soularr(v)' do If ('A WI soularr(v)'.Y[c] < 23) Then F = 1 Else F=0 End End return F
Mai 7, 2004 um 3:16 am Uhr #8860Bernhard KantzTeilnehmerInitialize the result variable F with the # operator which multiplies a value by a given number. The NumberOfValues function determines the number of values of the result dataset.
Dim F,G,H Dim c c = 0 F = 0s # NumberOfValues('A WI soularr(v)') For Each Value c In 'A WI soularr(v)' do If ('A WI soularr(v)'.Y[c] < 23) Then F[c] = 1 End End return F
Support
support@weisang.comMai 7, 2004 um 3:38 am Uhr #8861Bernhard KantzTeilnehmer… there is of course a much faster alternative:
Dim F F = 0 # NumberOfValues(Signal) F[ValuesAboveLevel(Signal, 23, EVENT_INDEX + EVENT_COMPLEMENT)] = 1 F
This code initializes the array with zeros and then uses an indexed assignment to set the values, where the event occures, to 1.
… even less code, you need when using the Trigger function:
1 - Integer32 Trigger(Signal, 23, 23)
Mai 7, 2004 um 6:44 am Uhr #8862Cayouettem@bowater.comTeilnehmerTried using the faster approach because it other one was jamming my computer, but i’m getting a syntax error. Any ideas why?
Mathieu
Dim F,G,H
Dim cc = 0
F = 0 # NumberOfValues(‘A WI soularr(v)’)
F[ValuesAboveLevel(‘A WI soularr(v)’, 23, EVENT_INDEX + EVENT_COMPLEMENT)] = 1return F
Mai 13, 2004 um 1:06 am Uhr #8193Cayouettem@bowater.comTeilnehmerI’m writing a function script and I was wondering how i could create an array. I am going to return that array to be plotted. Here is the code below; the variable ‘F’ should be the array for each sample taken by the variable ‘A WI soularr(v)’.
thanks,
Mathieu
CODE:
Dim F,G,H
Dim c
c = 0
For Each Value c In 'A WI soularr(v)' do
If ('A WI soularr(v)'.Y[c] < 23) Then F = 1 Else F=0 End End return F [/code]Mai 13, 2004 um 1:06 am Uhr #8863Bernhard KantzTeilnehmerYour code runs perfectly on our test machine.
Please make sure that you do not have a syntax error in ‘A WI soularr(v)’.
If your problem persists, please send us an example database to support@weisang.com along with the exact version number of your FlexPro installation 6.0.xx which you can find in ?=>About FlexPro… -
AutorBeiträge
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.