I tried this:
Code: Select all
2,2 + 3,3
Why?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
2,2 + 3,3
Code: Select all
put 2.2 + 3.3
Code: Select all
(2,2) + (3,3)
Exactly!MaxV wrote:Yes, I understood.
I tried also:but I can't act on points directly.Code: Select all
(2,2) + (3,3)
You can use "dateitems" to work with time and dates (almost) directly!MaxV wrote:[*]working on date and time directly (12/Mar/2013 + 1 = 13/Mar/2013; 3:02 + 1:00 = 4:02)[/list]
No idea about RebolMaxV wrote:On rebol language is a standard, and now rebol is open source, rebol it's in C and C++ like LiveCode, so an inclusion of these features could be possible.
Code: Select all
function addPoints firstPoint secondPoint
add the first item of firstPoint to the first item of secondPoint
add the second item of firstPoint to the second item of secondPoint
return secondPoint
end addPoints
Go figure! A little bored?Dixie wrote:will return 5.5 in the message box...Code: Select all
put 2.2 + 3.3
Yesmwieder wrote:@MaxV- I'm curious about what you expect to get if you add two points together.
Another point?
Yesmwieder wrote: Is the second set of coordinates supposed to be an offset to the first set?
Nothing, type mismatch.mwieder wrote: If that's the case, what would you expect for a rectangle? (100,200,200,300) + (3,3) = ?
Well, it's my fault; I was used with this:mwieder wrote: I think there's a limit to the guessing that the parser can do with the input it's given.
Code: Select all
type? 2x5 = point!
type? 125.212.101 = color! (rgb format)
type? 2/3/2103 = date!
type? "hello" = string!
type? 20.30.150.200 = rect!
type? 10:20 = time!
# operations
2x2 + 3 = 5x5
2x2 + 3x4 = 5x6
150.3.200 + 1 = 151.4.201
151.3.200 + 10.25.37 = 161.28.237
2/3/2013 + 35 = 6-Apr-2013