跳轉到內容

Rebol 程式設計/inside?

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

如果第二對的 X 和 Y 都小於第一對,則為 TRUE。

INSIDE? 是一個函式值。

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

原始碼

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