How paste multi line script in terminal

Hi,

Could someone please help me on how to paste notepad code into terminal,
when i am pressing ctrl+v, it is executing individual line instead as a whole script.
below is the code snapshot

def maxNo(t1:(Int, String), t2:(Int, String))={
if(t1._1==t2._1){
if(t1._2>t2._2) t1 else t2
} else if(t1._1>t2._1){
return t1
} else t2
}
image

You can use the :paste functionality in scala repl.
it is used specifically for your case
more information about this is here

and here
https://alvinalexander.com/scala/scala-repl-how-to-paste-load-blocks-of-source-code

1 Like