Silvio.Falconi wrote:No i must make an Array with 3element
i´m just asking as it remind me of Problem when work with "Delaunay-Triangulierung"
Silvio.Falconi wrote:No i must make an Array with 3element
FUNCTION distanza_ciclometrica(nvalore)
local aTmp := {}
local i, j, k
FOR i := 1 TO 90
FOR j := i+1 TO 90
FOR k := j+1 TO 90
nTemp := distance(i, j, k)
IF nTemp == nvalore
AaDd(aTmp, {i, j, k})
ENDIF
NEXT
NEXT
NEXT
RETURN aTmp
FUNCTION distance(n1, n2, n3)
local nMin := n1
local nMax := n1
local nTemp
IF n2 < nMin
nMin := n2
ENDIF
IF n3 < nMin
nMin := n3
ENDIF
IF n2 > nMax
nMax := n2
ENDIF
IF n3 > nMax
nMax := n3
ENDIF
nTemp := (nMax - nMin) % 90
IF nTemp > 45
nTemp := 90 - nTemp
ENDIF
RETURN nTemp
FUNCTION distanza_matematica(nvalore)
local aTmp := {}
local i, j, k
FOR i := 1 TO 90
FOR j := i+1 TO 90
FOR k := j+1 TO 90
If distance(i,j,k)== nvalore
AaDd( aTmp, { i, j, k } )
ENDIF
NEXT
NEXT
NEXT
RETURN aTmp
Function distance(n1,n2,n3)
local nTemp:=0
if n1>n2
if n1>n3
nTemp:= n1-n2-n3
else
nTemp:= n3-n1-n2
endif
else
if n2>n3
nTemp:= n2-n1-n3
else
nTemp:= n3-n1-n2
endif
endif
return nTemp
FUNCTION distanza_matematica(nvalore)
local aTmp := {}
local nTotal,nAt
local i, j, k
FOR i := 1 TO 10
FOR j := i+1 TO 10
FOR k :=j+1 TO 10
nTotal :=distance(i,j,k)
If nTotal== nvalore
nAt := AScan( aTmp, { |a| a[1] = k .or. a[2] = i .or. a[3] = j } )
If nAt == 0
AaDd( aTmp, { i, j, k } )
ENDIF
ENDIF
NEXT
NEXT
NEXT
RETURN aTmp
Function distance(n1,n2,n3)
local nTemp:=0
if n1>n2
if n1>n3
nTemp:= n1-n2-n3
else
nTemp:= n3-n1-n2
endif
else
if n2>n3
nTemp:= n2-n1-n3
else
nTemp:= n3-n1-n2
endif
endif
return nTemp
nAt := AScan( aTmp, { |a| a[1] = i .or. a[2] = j .or. a[3] = k } )
use 100 of those listed Keywords for a Christmas Story
Here is a short Christmas story using 100 of the keywords from the Fivewin programming language:
It was Christmas Eve and Mary was feeling excited and anxious. She had been working on a special Christmas gift for her family using the Fivewin programming language, and she wanted to make sure everything was perfect.
She started by using the ALIAS keyword to assign a new name to the database table containing her family's gift list. Next, she used the AFIELDS keyword to retrieve the names of the fields in the table and the ADEL keyword to delete any unnecessary information.
Using the ASORT keyword, Mary sorted the list alphabetically by family member's name. She then used the ACOPY keyword to create a copy of the list as a backup.
As she worked, Mary kept an eye on the time using the ELAPTIME keyword. She didn't want to be late to the family Christmas party, so she used the ALTD keyword to check the keyboard buffer for any incoming messages from her friends or family.
As the evening approached, Mary used the CDOW keyword to check the day of the week and the DATE keyword to make sure it was indeed Christmas Eve. She then used the AMPM keyword to determine the appropriate time to leave for the party.
With everything in order, Mary packed up her computer and headed out the door. As she drove to her family's house, she used the CURDIR keyword to make sure she was headed in the right direction.
Upon arriving at the party, Mary was greeted with joy and excitement by her family. She used the ALLTRIM keyword to remove any excess space from their names as she hugged each of them.
As they sat down to dinner, Mary used the ASCAN keyword to search the table for her favorite dish. She was pleased to find that it had been included and used the AADD keyword to add an extra serving to her plate.
After dinner, the family gathered around the tree to exchange gifts. Mary used the AEVAL keyword to evaluate each gift and express her gratitude. She then used the DBCOMMIT keyword to save her appreciation in her heart and the DBUSEAREA keyword to open the database table containing her own gift for her family.
As she handed out the gifts, Mary couldn't help but feel a sense of pride and happiness. She had used the Fivewin programming language to create something special for her loved ones, and it had brought them all closer together.
As the night came to a close, Mary used the CLOSE keyword to shut down her computer and the DBCLOSEALL keyword to close the database table. She then used the AINS keyword to insert the memories of the wonderful evening into her heart and headed off to bed with a warm and contented feeling.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 110 guests