Yoko

All sides of Injection
It is currently 2025-12-17 10:08:21

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 2005-08-03 22:57:39 
Offline

Joined: 2005-07-28 01:02:45
Posts: 4
Пример моей задачи:

sub test()
var one
var two
var result

one = str(1) // обязательно стринг
two = 2 // обязательно интежер
result = ...
uo.print('Result: ' + result)
end sub

Банальное result = int(one) + two выдает значения 0 + 2.


Top
   
 Post subject:
PostPosted: 2005-08-03 23:19:10 
Offline
Junior Expert
User avatar

Joined: 2004-11-13 00:43:55
Posts: 474
Location: Киберзадроцк
Code:
sub test() 
var one
var two
var result

one = 1 // обязательно стринг
two = 2 // обязательно интежер
result = str(one+two)
uo.print('Result: '+result)
end sub


Top
   
 Post subject:
PostPosted: 2005-08-04 00:23:02 
Offline

Joined: 2005-07-28 01:02:45
Posts: 4
Invalid operation for this type.


Top
   
 Post subject:
PostPosted: 2005-08-04 09:28:23 
Offline

Joined: 2005-07-10 11:26:37
Posts: 45
sub test()
var one
var two
var result
one = str(1)
two = 2
result = val(one) + two
uo.print('Result: ' + str(result))
end sub

VAL - строку в число
INT(число) - == floor()


Top
   
 Post subject:
PostPosted: 2005-08-04 19:50:16 
Offline

Joined: 2005-07-28 01:02:45
Posts: 4
Спасибо! Все верно.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited