跳轉到內容

Rebol 程式設計/outside?

來自華夏公益教科書,開放的書籍,開放的世界
OUTSIDE? p1 p2 

如果第二對的 X 或 Y 大於第一對,則為 TRUE。

OUTSIDE? 是一個函式值。

  • p1 -- (型別:對)
  • p2 -- (型別:對)

原始碼

[編輯 | 編輯原始碼]
outside?: func [
    {TRUE if either X and Y of the second pair are greater than the first.} 
    p1 [pair!] 
    p2 [pair!]
][
    found? any [p2/x > p1/x p2/y > p1/y]
]
華夏公益教科書