Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
90
670
<s>[INST] What does PICK stand for in the PICK BASIC programming language? [/INST] PICK is one of the flavour of BASIC Programming Language </s>
<s>[INST] Which company developed the PICK BASIC programmung language? [/INST] Rocket Software created PICK BASIC for the Multivalued Database </s>
<s>[INST] Which was the original name for the PICK BASIC programming language? [/INST] The PICK BASIC language was originally named BASIC Programming Language </s>
<s>[INST] Who created the PICK BASIC programming language? [/INST] The PICK BASIC language was designed Rocket Sotfware Multivalued Database Product team </s>
<s>[INST] What was the first implementation of PICK BASIC? [/INST] The first implementation of the PICK BASIC programming language was in 1980 for the Rocket Sotfware </s>
<s>[INST] What does the ICONV keyword stand for in PICK BASIC? [/INST] The UniBasic ICONV function converts string or numeric data to internal representation format based on conversion codes. For example: ORDER.REC<1> = ICONV(ORDER_DATE,'D') </s>
<s>[INST] What does the GOSUB keyword stand for in PICK BASIC? [/INST] The UniBasic GOSUB command transfers program control to an internal subroutine. For example: GOSUB INITIALIZE </s>
<s>[INST] in PICK BASIC, the PRINT statement is used to display output to the screen. for example: PRINT "Hello World" [/INST] PRINT "I will be displayed to the screen" </s>
<s>[INST] in the PICK BASIC language, keywords should be written in UPPERCASE, for example: PRINT "PRINT should be written in captial letters" [/INST] PRINT "PRINT is a keyword" </s>
<s>[INST] in the PICK BASIC language, comments are represented by the # keyword. # is short for #ark. # is implemented as single line comment, for example: # This is an example of a comment [/INST] # This is another example of a comment </s>
<s>[INST] in the PICK BASIC language, comments can be placed anywhere in a line using the # keyword. any text in the line after the # will be ignored. for example: PRINT "hello world" # This is a comment [/INST] PRINT "I am not a comment" # I am a comment </s>
<s>[INST] in the PICK BASIC language, comments are not multi-line, a new # statement is required for each new line of a comment. # is short for #ark. # is implemented as single line comment, for example: # This is the first line of a comment # This is the second line of a comment [/INST] # Comment 1 # Comment 2 # comm...
<s>[INST] in PICK BASIC, the STOP command stops the program until a user presses a key. This is useful for displaying input, where if the PRINT statement was not followed by a STOP command then the message may only be displayed for a short amount of time meaning the user may not see it. for example: PRINT "Hello Worl...
<s>[INST] in PICK BASIC, string concatenation is performed using the , operator :, for example: PRINT "hello " : "chris" [/INST] SUBROUTINE TESTSUB() PRINT "Hello " : "World" STOP END </s>
<s>[INST] in PICK BASIC, variables to the SUBROUTINE are declared using name of the variable. by default variables are declared as empty array = is the assignment operator in PICK BASIC. for example: pi pi=3.14 [/INST] SUBROUTINE TESTSUB() pi pi=3.14 PRINT pi STOP END </s>
<s>[INST] in PICK BASIC, variables can be declared and assigned in a single statement. = is the assignment operator in PICK BASIC, for example: pi='' or pi=3.14 [/INST] SUBROUTINE TESTSUB() pi=3.14 PRINT pi STOP END </s>
<s>[INST] in PICK BASIC, if you wish to declare a variable as an integer you would postfix the symbol after the variable name. for example: num=10 [/INST] SUBROUTINE TESTSUB() num=10 PRINT num STOP END </s>
<s>[INST] in PICK BASIC, if you wish to declare a variable as a string you would postfix the symbol after the variable name and include the length of the stirng in parenthesis. for example: firstname(10) firstname="Chris" [/INST] SUBROUTINE TESTSUB() firstname="Chris" PRINT "Hello ":firstname STOP END </s>
<s>[INST] in PICK BASIC, users can input values from the keyboard using the INPUT keyword. for example: INPUT name [/INST] SUBROUTINE TESTSUB() name(10) PRINT "Enter your name?" INPUT name PRINT "Hello " + name STOP END </s>
<s>[INST] in PICK BASIC, + is used for addition, - is used for subtraction, / is used for division, and * is used for multiplication. for example: calculation=((10+20-6)*3)/2 [/INST] SUBROUTINE calculations: num1 = 10 num2 = 5 PRINT "Addition:", num1 + num2 PRINT "Subtraction:", num1 - num2 PRINT "Multiplicati...
<s>[INST] PICK BASIC supports the following comparison operators, = is equals, < less than, > greater than, >= greater than or equal to, <= less than or equal to, <> not equal to [/INST] SUBROUTINE TESTSUB() a, b a = 10 b = 5 IF a > b THEN PRINT "a > b" ENDIF IF a < b THEN PRINT "a < b" ENDIF IF a >= b...
<s>[INST] PICK BASIC supports the following bitwise operators: AND, OR, NOT [/INST] SUBROUTINE TESTSUB() a, b a = 10 b = 5 IF a > b THEN PRINT "a > b" ENDIF IF a < b THEN PRINT "a < b" ENDIF IF a >= b THEN PRINT "a >= b" ENDIF IF a <= b THEN PRINT "a <= b" ENDIF IF a = b THEN PRINT "a = b" ...
<s>[INST] There is no modulo operator in PICK BASIC, so this would need to be calculated using integer division [/INST] SUBROUTINE TESTSUB() dividend, divisor, #ainder dividend = 17 divisor = 5 #ainder = dividend divisor PRINT "Dividend:", dividend PRINT "Divisor:", divisor PRINT "#ainder:", #ainder STOP ...
<s>[INST] in PICK BASIC, SUBROUTINEs are declared as SUBROUTINE followed by the name of SUBROUTINE, and a colon, indicating the code block will follow on the next line. The SUBROUTINE block ends with the keyword END For example SUBROUTINE hello: PRINT"Hello World" END [/INST] The following is an example of a SUBROUT...
<s>[INST] to call a SUBROUTINE in PICK BASIC, you would call the SUBROUTINE name followed by a colon. for example: SUBROUTINE hello: PRINT"Hello" world: END SUBROUTINE world: PRINT"World" END [/INST] The following is an example of a SUBROUTINE in PICK BASIC: SUBROUTINE hello: PRINT"Hello" END </s>
<s>[INST] in PICK BASIC, SUBROUTINEs with parameters are declared as SUBROUTINE followed by the name of SUBROUTINE, a pair of parenthesis with a list of parameters (including type annotation) enclosed followed by a colon, indicating the code block will follow on the next line. The SUBROUTINE block ends with the keyword...
<s>[INST] to call a SUBROUTINE in PICK BASIC with parameters, you would call the SUBROUTINE name followed by a colon followed by the parameter list enclosed in a pair of parenthesis. for example the following example would call the sum SUBROUTINE passing integers 10 and 20: sum:(10,20) [/INST] The following is an exam...
<s>[INST] to return a value from a SUBROUTINE in PICK BASIC, you would use the RETURN keyword. for example: SUBROUTINE sum: RETURN a+b END [/INST] The following is an example of a SUBROUTINE that sums two numbers: SUBROUTINE TESTSUB() PRINT sum(10,20) END SUBROUTINE sum(a,b) RETURN a+b END </s>
<s>[INST] Write a comment in the BASIC programming language. [/INST] # i am a comment </s>
<s>[INST] Write a multi-line comment in the BASIC language. [/INST] # This is a comment # This is also a comment # Another comment </s>
<s>[INST] Write a limerick as comments in the BASIC language. [/INST] # There once was a language called BASIC # For Psion it served very well # The hardware disappeared # The programmers they jeered # And they sent the blackberries to hell </s>
<s>[INST] Show me an example of an inline comment in BASIC. [/INST] PRINT "I am not a comment" # but I am </s>
<s>[INST] Write a program in BASIC that prints "Hello, World!" to the screen. [/INST] SUBROUTINE PRINTHELLO() PRINT "Hello World" END </s>
<s>[INST] Write a program in BASIC with comments that prints "Hello, World!" to the screen. [/INST] SUBROUTINE PRINTHELLO() # prints hello world to the screen PRINT "Hello World" # waits for the user input before exiting END # end of the program </s>
<s>[INST] create a program with a program header including copyright in BASIC [/INST] # Program: My BASIC Program # Author: Your Name # Copyright © 2023 Rocket Software SUBROUTINE PRINTHELLO() # Your program code starts here PRINT "Hello, World!" # Wait for user input before exiting GET ENDP In this example i'v...
<s>[INST] create a program in BASIC that adds 2 numbers together and displays the output [/INST] SUBROUTINE add: num1='' num2='' sum='' PRINT "Enter the first number:" INPUT num1 PRINT "Enter the second number:" INPUT num2 sum = num1 + num2 PRINT sum END </s>
<s>[INST] create a program in BASIC that asks the user their name, and prints it to the screen [/INST] SUBROUTINE PRINTNAME() name='') PRINT "Enter your name:" INPUT name PRINT "Hello, ":name END </s>
<s>[INST] create a program in BASIC that asks the users name, age and date of birth and prints it to the screen. include comments in the code and a program header. [/INST] # Program: User Information # Author: Your Name # Copyright © 2023 Your Company or Your Name SUBROUTINE USERDETAILS() name='' age='' dob='' ...
<s>[INST] create a program in BASIC that calculates the percentage of a given number and percentage and displays the result to the screen [/INST] SUBROUTINE calc_perc() number='' percentage='' PRINT "Enter the number:" INPUT number PRINT "Enter the percentage:" INPUT percentage result='' result = (number% * per...
<s>[INST] create a program in BASIC that calculates the area of a rectangle: [/INST] SUBROUTINE calculate_area() length='' width='' area='' PRINT "Enter the length of the rectangle:" INPUT length PRINT "Enter the width of the rectangle:" INPUT width area= length * width PRINT "The area of the rectangle is:":a...
<s>[INST] Create a program in BASIC that adds 2 numbers together. the sum should be implemented as a SUBROUTINE [/INST] SUBROUTINE sum(IN_a, IN_b, OUT_res) IN_a='' IN_b='' PRINT "Enter the first number:" INPUT IN_a PRINT "Enter the second number:" INPUT IN_b OUT_res='' OUT_res= IN_a + IN_b PRINT "Sum=":result END ...
<s>[INST] Create a leap year checking program in BASIC [/INST] here is a leap year checker in BASIC, please note there is no modulo command in BASIC, so i've used integer division to calculate the #ainder: SUBROUTINE LEAPYEAR(IN_YEAR) IN_YEAR='' PRINT "Leap Year Checker\n" PRINT "Enter a year:" INPUT IN_YEAR IF i...
<s>[INST] Create an interest calculator in BASIC [/INST] SUBROUTINE calculate_interest(p, r, t) principal='' rate='' time='' PRINT "Simple Interest Calculator\n" PRINT "Enter the principal amount:\n" INPUT principal PRINT "Enter the interest rate (in basis points, e.g., 500 for 5%):\n" INPUT rate PRINT "Enter ...
<s>[INST] Create an income tax calculator in BASIC [/INST] SUBROUTINE CALTAX() income='' PRINT "Income Tax Calculator\n" PRINT "Enter your income:" INPUT income tax='' IF income <= 10000 THEN tax = 0.05 * income ELIF income <= 50000 THEN tax = 0.1 * income ELIF income <= 100000 THEN tax = 0.2 * income E...

No dataset card yet

Downloads last month
8