Jump to content
BryceTheCoder

Make the log ask you a question?

Recommended Posts

Hello, i know its possible to make your log ask your something for example your name or something(but i forgot how to) , but then can i make it ask something around:

 

Variable: then you can type 1 or 0 and whatever you type it actaully makes the variable in your script that number. Soo if i put 1, it would make the script have this variable in it:

Test:= 1;

Link to comment
Share on other sites

Would one of these 2 functions meet your needs?

 

program New;

var
 S1, S2: String;
 Num1, Num2: Integer;
begin
 ClearDebug;

 InputQuery('Enter a number', 'Your number?', S1);
 S2 := InputBox('Enter another number', 'Your number?', '0');
 Num1 := StrToIntDef(S1, 0);
 Num2 := StrToIntDef(S2, 0);

 WriteLn('Your first number as text: ''' + S1 + '''');
 WriteLn('As a number: ' + IntToStr(Num1));
 WriteLn('Your second number as text: ''' + S2 + '''');
 WriteLn('As a number: ' + IntToStr(Num2));
end.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...